diff options
author | Oscar Najera <hi@oscarnajera.com> | 2023-10-19 04:08:37 +0200 |
---|---|---|
committer | Oscar Najera <hi@oscarnajera.com> | 2023-10-19 15:15:45 +0200 |
commit | 2a1b0bf3e757812f230dc769426b804389c797e0 (patch) | |
tree | d5559033320d2c7172596ff31be3a6222ccd3d12 /layouts/partials | |
parent | 61b0a3b49513b95d90fa9201f625e744a5d3fc27 (diff) | |
download | hugo-minimalist-theme-2a1b0bf3e757812f230dc769426b804389c797e0.tar.gz hugo-minimalist-theme-2a1b0bf3e757812f230dc769426b804389c797e0.tar.bz2 hugo-minimalist-theme-2a1b0bf3e757812f230dc769426b804389c797e0.zip |
Image gallery
Diffstat (limited to 'layouts/partials')
-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 }} |