npf/v1.0/README.md

47 lines
1.3 KiB
Markdown

⸨ v1.0 ⸩ **OUTDATED**, [v3.0 is now here](https://glenthemes.tumblr.com/post/659034084446748672/npf-images-v3).
* original post: [glenthemes.tumblr.com/post/614223478203285504](https://glenthemes.tumblr.com/post/614223478203285504/mobile-photosets-fix-widths-custom-spacing)
* npf lightbox by [codematurgy](https://codematurgy.tumblr.com/post/179837255439/npfphotosets-plugin)
---
### How to use:
Put before `</body>`:
```
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="//static.tumblr.com/gtjt4bo/s13ri4u01/npf-styling.js"></script>
<script src="//cdn.jsdelivr.net/gh/boscoxvi/npfphotosets/npfphotosets.js"></script>
<script>
npfPhotosets(".posts", npfOptions); // .posts is your posts selector
</script>
```
Put before `</style>`:
```
/*------- npf photoset image spacing-------*/
:root {
--NPF-Image-Spacing:4px; /* spacing value */
}
.npf_row {
display:flex!important;
margin:calc(var(--NPF-Image-Spacing) / -2)!important;
margin-bottom:calc(var(--NPF-Image-Spacing) / 2)!important;
}
.npf_row:last-of-type {
margin-bottom:calc(var(--NPF-Image-Spacing) / -2)!important;
}
.tmblr-full {
flex:1;
margin:0!important;
padding:calc(var(--NPF-Image-Spacing) / 2)!important;
width:auto!important;
height:auto!important;
outline:none;
}
```