diff --git a/layouts/shortcodes/snap-gallery.html b/layouts/shortcodes/snap-gallery.html index 5218e06..07c68e0 100644 --- a/layouts/shortcodes/snap-gallery.html +++ b/layouts/shortcodes/snap-gallery.html @@ -1,9 +1,8 @@ -{{/* TODO: Ensure CSS/JS is only loaded once */}} -{{- with resources.Get "scss/snap-gallery.scss" | toCSS }} - -{{- end }} +{{/* Count number of gallery on page */}} +{{- $.Page.Scratch.Add "gallerycount" 1 -}} +{{ $galno := $.Page.Scratch.Get "gallerycount" }} -{{/* Initialise variables */}} +{{/* Initialise variables holding image paths */}} {{ $imgs := slice }} {{/* Get/sanitise image paths */}} @@ -24,13 +23,13 @@