summaryrefslogtreecommitdiff
path: root/layouts/_markup/render-image.html
blob: 15b2a4b5e891677e01f67ba9ff586a0e3e4c4023 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{{- $src := .Destination -}}
{{- $alt := .Text | default "" -}}
{{- $caption := .Title | default "" -}}
{{- $class := .Attributes.class | default "" -}}

<figure>
    <img
        class="lazy {{ $class }}" loading="lazy"
        src="{{ $src }}" alt="{{ $alt }}"
        data-libra
    />
    {{- if $caption }}
    <figcaption>
        <h4>{{ $caption | markdownify }}</h4>
    </figcaption>
    {{- end }}
</figure>