diff options
Diffstat (limited to 'layouts/partials/image-gallery.html')
-rw-r--r-- | layouts/partials/image-gallery.html | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/layouts/partials/image-gallery.html b/layouts/partials/image-gallery.html new file mode 100644 index 0000000..5e5b874 --- /dev/null +++ b/layouts/partials/image-gallery.html @@ -0,0 +1,25 @@ +{{ with .Params.album }} + <section class="gallery"> + {{ range $id, $val := readDir (printf "/assets/media/albums/%s" (string .)) }} + {{ with resources.Get (printf "media/albums/%s/%s" $.Params.album $val.Name) }} + <div class="gallery__item"> + <input + type="radio" + id="img-{{ $id }}" + checked + name="gallery" + class="gallery__selector" + /> + <img + class="gallery__img" + src="{{ (.Fill "1152x768").Permalink }}" + alt="" + /> + <label for="img-{{ $id }}" class="gallery__thumb"> + <img src="{{ (.Fill "150x100").Permalink }}" alt="" /> + </label> + </div> + {{ end }} + {{ end }} + </section> +{{ end }} |