summaryrefslogtreecommitdiff
path: root/layouts/_default/_markup/render-image.html
blob: 21e574af77198103557fb97d89c5ef7502108e52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{{- $src := .Destination -}}
{{- $alt := .Text | default "" -}}
{{- $caption := .Title | default "" -}}
<a href="{{ $src }}" data-fancybox data-caption="{{ $caption }}" class="fancybox-link">
    <figure>
        <img
            class="lazy" loading="lazy"
            src="{{ $src }}" alt="{{ $alt }}"
        />
        {{- if $caption }}
        <figcaption>
            <h4>{{ $caption | markdownify }}</h4>
        </figcaption>
        {{- end }}
    </figure>
</a>