blob: 5447d4659e3542cac97e4f709af535b44c285da4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
{{ if and .Site.Params.imageGallery .Params.gallery }}
{{ $galleryLength := len .Params.gallery }}
{{ $imageGalleryClass := "" }}
{{ if gt $galleryLength 0 }}
<div class="image-gallery">
<div class="image-gallery-metabar">
<span>Gallery {{ $galleryLength }} images</span>
</div>
<div class="image-gallery-photos {{ if gt $galleryLength 2 }}image-gallery-photos--thumbnail{{ end }}">
{{ range $index, $element := .Params.gallery }}
{{ $image := (split $element " ") }}
{{ $imageLength := len $image }}
<div class="photo-box">
<a class="photo-box-inner fancybox" data-fancybox-group="gallery-{{ $.UniqueID }}"
title="{{ if gt $imageLength 2 }}{{ index $image 2 }}{{ else }}{{ index $image 1 }}{{ end }}" href="{{ index $image 0 }}">
<img class="photo" src="{{ if gt $imageLength 2 }}{{ index $image 1 }}{{ else }}{{ index $image 0 }}{{ end }}" itemprop="image">
</a>
</div>
{{ end }}
</div>
</div>
{{ end }}
{{ end }}
|