diff options
author | Justin Berthault <justin.berthault@zaclys.net> | 2018-01-30 11:56:35 +0300 |
---|---|---|
committer | Justin Berthault <justin.berthault@zaclys.net> | 2018-01-30 11:56:35 +0300 |
commit | 8c0255a8e74d806fa9e62f77f38c3cf3882331e9 (patch) | |
tree | 8d825ff584b3d8ccf9fd0fc47aeb72d1e105d573 /layouts/partials | |
parent | 5acd4af8ca07dce7e744072a1bdeecb75077a07c (diff) |
Add Automatic gallery function with Page-Bundle feature
- Gallery images stored in `images/gallery`
- Auto-resizing
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/gallery.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/layouts/partials/gallery.html b/layouts/partials/gallery.html new file mode 100644 index 0000000..7123e69 --- /dev/null +++ b/layouts/partials/gallery.html @@ -0,0 +1,13 @@ +<div class="gallery"> +{{ with .Resources.Match "images/gallery/*.*" }} +{{ range . }} +{{ $scaled := .Resize "256x q80" }} +<div class="gallery-item"> +<a href="{{ .RelPermalink }}"> +<img class="thumbnail" src="{{ $scaled.Permalink }}"> +</a> +</div> +{{ end }} +{{ end }} +</div> + |