summaryrefslogtreecommitdiff
path: root/layouts/_default/_markup/render-image.html
blob: 697c33c2a640a87d7ee0a4c9ae784ec910720e0f (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 "" -}}
<figure>
  <a href="{{ $src }}" data-fancybox data-caption="{{ $alt }}">
    <img
      class="lazy" loading="lazy"
      src="{{ $src }}" alt="{{ $alt }}"
    />
  </a>
  {{- if $caption }}
  <figcaption>
    <h4>{{ $caption | markdownify }}</h4>
  </figcaption>
  {{- end }}
</figure>