add image captions

This commit is contained in:
Tobias Pfandzelter 2020-08-05 21:52:27 +02:00
parent 41db6a77dc
commit 73ad44e2ca
2 changed files with 12 additions and 0 deletions

View file

@ -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 }}

View file

@ -4,3 +4,6 @@ code{color: #FFFFFF; background:#000000; padding:2px}
pre{color: #FFFFFF; background:#000000; padding:24px; white-space: pre-wrap}
article{padding:24px 0}
.center {display: block;margin-left: auto;margin-right: auto;width: 100%;}
img {display: block; max-width: 100%; height: auto;}
figcaption {color: #888; font: 12px/1.5 monospace; text-align: center;}