Add 'v2.0/README.md'

This commit is contained in:
HT 2022-07-22 05:24:35 +01:00
parent e5255a2b46
commit 5c2ba987cd
1 changed files with 47 additions and 0 deletions

47
v2.0/README.md Normal file
View File

@ -0,0 +1,47 @@
⸨ v2.0 ⸩ **OUTDATED**, [v3.0 is now here](https://glenthemes.tumblr.com/post/659034084446748672/npf-images-v3).
* original post: [glenthemes.tumblr.com/post/638038350689976320](https://glenthemes.tumblr.com/post/638038350689976320)
---
### How to use:
Add jQuery under `<head>` if your page doesn't have it:
```
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
```
Also under `<head>` (after jQuery), add:
```
<!--
NPF IMAGES READJUSTMENT | @glenthemes
v2.0 [last updated: 2021-06-03]
-->
<link href="//git.froggi.es/glenthemes/npf/raw/main/v2.0/npf-override.css" rel="stylesheet">
<script src="//git.froggi.es/glenthemes/npf/raw/main/v2.0/npf-evenize.js"></script>
<style type="text/css">
:root {
--NPF-Image-Spacing:4px;
--NPF-Bottom-Gap-From-Captions:1em;
}
</style>
```
Use the in-code searchbar and look up `{block:Posts}`
On the next line or so, you should find something similar:
```
<div class="posts">
```
Add `post-type="{PostType}"` before the closing pointy bracket:
```
<div class="posts" post-type="{PostType}">
```
To edit the spacing, go to `:root`:
[image](https://64.media.tumblr.com/730347cdde97981a81b387e4c27cc9a7/16d89e95728e90f1-fc/s640x960/201f89a347ad1c81b4dee7b5922fa632bf35171a.png)
---
For further debugging, visit [the post](https://glenthemes.tumblr.com/post/638038350689976320) and scroll down to "PLEASE NOTE".