Add an image gallery shortcode
This commit is contained in:
parent
fd01d9d124
commit
124bfaed67
11 changed files with 389 additions and 0 deletions
20
layouts/_shortcodes/gallery.html
Normal file
20
layouts/_shortcodes/gallery.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{{- /*
|
||||
Image gallery: square thumbnails, two per row on wide screens, that open the full image in a
|
||||
lightbox (assets/js/gallery.js) with the alt text and credit. Without JavaScript the
|
||||
thumbnails link to the full image.
|
||||
|
||||
{{< gallery >}}
|
||||
{{< gallery-image src="photo1.jpg" alt="What the photo shows" credit="© Photographer" >}}
|
||||
{{< gallery-image src="photo2.jpg" alt="…" credit="…" >}}
|
||||
{{< /gallery >}}
|
||||
*/ -}}
|
||||
<div class="gallery" data-gallery
|
||||
data-label-dialog="{{ i18n "gallery_dialog" }}"
|
||||
data-label-close="{{ i18n "gallery_close" }}"
|
||||
data-label-previous="{{ i18n "gallery_previous" }}"
|
||||
data-label-next="{{ i18n "gallery_next" }}">
|
||||
<ul class="gallery__list">
|
||||
{{- .Inner }}
|
||||
</ul>
|
||||
</div>
|
||||
{{- /* chomp */ -}}
|
||||
Loading…
Reference in a new issue