summaryrefslogtreecommitdiff
path: root/layouts/_default/_markup
diff options
context:
space:
mode:
authorTobias Pfandzelter <pfandzelter@campus.tu-berlin.de>2020-11-17 17:59:59 +0100
committerTobias Pfandzelter <pfandzelter@campus.tu-berlin.de>2020-11-17 17:59:59 +0100
commit2563883c1c0e1756ebb015a0711d6fb622ff14a8 (patch)
treedea7e034ea349f1c221103e1926bf6ec651c3d85 /layouts/_default/_markup
parent73ad44e2ca7a5674ce0abc311aa11652cca99801 (diff)
fix generation of figcaptions
Diffstat (limited to 'layouts/_default/_markup')
-rw-r--r--layouts/_default/_markup/render-image.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html
new file mode 100644
index 0000000..74f6f95
--- /dev/null
+++ b/layouts/_default/_markup/render-image.html
@@ -0,0 +1,9 @@
+{{ if .Title }}
+<figure>
+ <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
+ <figcaption>{{ .Title }}</figcaption>
+</figure>
+{{ else }}
+<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
+{{ end }}
+