diff --git a/layouts/partials/lightbox.html b/layouts/partials/lightbox.html new file mode 100644 index 0000000..d4f84e0 --- /dev/null +++ b/layouts/partials/lightbox.html @@ -0,0 +1,22 @@ +{{/* The Modal/Lightbox */}} +{{ $imgs := .imgs }} +{{ $galno := .galno }} +
+ {{ range $i, $img := $imgs }} +
+
{{ add $i 1 }} / {{ len $imgs }}
+ +
+ {{ end }} + + + × + + + + + {{/* +
+

+
*/}} +
diff --git a/layouts/shortcodes/snap-gallery.html b/layouts/shortcodes/snap-gallery.html index fa785ad..12286e5 100644 --- a/layouts/shortcodes/snap-gallery.html +++ b/layouts/shortcodes/snap-gallery.html @@ -23,32 +23,12 @@
{{ range $i, $img := $imgs }}
- +
{{ end }}
-{{/* The Modal/Lightbox */}} -
- {{ range $i, $img := $imgs }} -
-
{{ add $i 1 }} / {{ len $imgs }}
- -
- {{ end }} - - - × - - - - - {{/* -
-

-
*/}} -
- +{{ partial "lightbox" (dict "galno" $galno "imgs" $imgs) }} {{/* Load CSS/JS and make sure it is only loaded once */}} {{- if eq ($.Page.Scratch.Get "gallerycount") 1 }}