diff options
| author | Tobias Pfandzelter <pfandzelter@campus.tu-berlin.de> | 2020-08-05 21:52:27 +0200 |
|---|---|---|
| committer | Tobias Pfandzelter <pfandzelter@campus.tu-berlin.de> | 2020-08-05 21:52:27 +0200 |
| commit | 73ad44e2ca7a5674ce0abc311aa11652cca99801 (patch) | |
| tree | 2265a7a17f001771d62af356ed38df211afcd0e6 /layouts/_default | |
| parent | 41db6a77dc71c5a730ec18fe02080ffe9aa06bb8 (diff) | |
add image captions
Diffstat (limited to 'layouts/_default')
| -rw-r--r-- | layouts/_default/render-image.html | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/layouts/_default/render-image.html b/layouts/_default/render-image.html new file mode 100644 index 0000000..74f6f95 --- /dev/null +++ b/layouts/_default/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 }} + |