LoveIt/layouts/_default/_markup/render-image.html
2020-02-07 00:10:00 +08:00

11 lines
476 B
HTML

<figure>
{{- /* Lazyload */ -}}
{{- $loading := resources.Get "svg/loading.svg" | minify -}}
<img src="{{ $loading.RelPermalink | safeURL }}" data-sizes="auto" data-src="{{ .Destination | safeURL }}" alt="{{ .Text }}"{{ with .Title }} title="{{ . }}"{{ end }} class="lazyload">
{{- $caption := .Title | default .Text -}}
{{- with $caption -}}
<figcaption class="image-caption">
{{- . -}}
</figcaption>
{{- end -}}
</figure>