From 73ad44e2ca7a5674ce0abc311aa11652cca99801 Mon Sep 17 00:00:00 2001 From: Tobias Pfandzelter Date: Wed, 5 Aug 2020 21:52:27 +0200 Subject: [PATCH] add image captions --- layouts/_default/render-image.html | 9 +++++++++ static/css/style.css | 3 +++ 2 files changed, 12 insertions(+) create mode 100644 layouts/_default/render-image.html 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 }} +
+ {{ .Text }} +
{{ .Title }}
+
+{{ else }} +{{ .Text }} +{{ end }} + diff --git a/static/css/style.css b/static/css/style.css index dfc6325..917a8f7 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -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;} +