summaryrefslogtreecommitdiff
path: root/layouts/_default
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/_markup/render-image.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html
new file mode 100644
index 00000000..697c33c2
--- /dev/null
+++ b/layouts/_default/_markup/render-image.html
@@ -0,0 +1,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>