From 73ad44e2ca7a5674ce0abc311aa11652cca99801 Mon Sep 17 00:00:00 2001 From: Tobias Pfandzelter Date: Wed, 5 Aug 2020 21:52:27 +0200 Subject: [PATCH 1/3] 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;} + From 2563883c1c0e1756ebb015a0711d6fb622ff14a8 Mon Sep 17 00:00:00 2001 From: Tobias Pfandzelter Date: Tue, 17 Nov 2020 17:59:59 +0100 Subject: [PATCH 2/3] fix generation of figcaptions --- layouts/_default/{ => _markup}/render-image.html | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename layouts/_default/{ => _markup}/render-image.html (100%) diff --git a/layouts/_default/render-image.html b/layouts/_default/_markup/render-image.html similarity index 100% rename from layouts/_default/render-image.html rename to layouts/_default/_markup/render-image.html From f2dbf084a70b47113f6741455b34e3d65fcdabb1 Mon Sep 17 00:00:00 2001 From: Tobias Pfandzelter Date: Wed, 18 Nov 2020 18:12:55 +0100 Subject: [PATCH 3/3] resolve figure size --- layouts/_default/_markup/render-image.html | 4 +++- static/css/style.css | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 74f6f95..41008ca 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -4,6 +4,8 @@
{{ .Title }}
{{ else }} -{{ .Text }} +
+ {{ .Text }} +
{{ end }} diff --git a/static/css/style.css b/static/css/style.css index 917a8f7..dbd8b6b 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -6,4 +6,4 @@ 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;} - +figure {margin: auto}