diff --git a/v1.0/npf-styling.js b/v1.0/npf-styling.js new file mode 100644 index 0000000..6665569 --- /dev/null +++ b/v1.0/npf-styling.js @@ -0,0 +1,79 @@ +// npf photoset styling by @glenthemes +// npf photoset lightboxes by @codematurgy +var npfOptions = { + rowClass:"npf_row", + imageContainerClass:"tmblr-full", + generatedPhotosetContainerClass:"npf_photoset", + imageClass:"npf_image", + includeCommonPhotosets: true, + useTumblrLightbox: true, + insertGalleryIndicator: false, + galleryIndicatorClass: "npf_gallery_indicator", + galleryIndicatorContent: "", + photosetMargins:"" +} + +$(document).ready(function(){ + $(".npf_row").each(function(){ + npf_img = $(this).find("img"); + npf_rowHeight = Math.max.apply( + Math, npf_img.map(function(){ + return $(this).height(); + }).get()); + + var spacing = getComputedStyle(document.documentElement) + .getPropertyValue("--NPF-Image-Spacing"); + var sparce = parseInt(spacing); + + var maxh = Math.floor(npf_rowHeight + (sparce * 2)); + + $(this).css({"max-height":maxh}); + }); + + $(".tmblr-full").each(function(){ + if (!$(this).parent().is(".npf_row")) { + $(this).wrap( "
" ); + } + + $(this).css({"text-align":"left"}); + }); + + $(".tmblr-full img").each(function(i, npf){ + var npf_img = $(npf); + var create_div = $("