From 55f65fdbf8fb0954a87c338b86fdb8ce31c8e213 Mon Sep 17 00:00:00 2001 From: Luca Date: Mon, 23 Nov 2020 18:56:53 +0100 Subject: [PATCH] Add custom 'image' shortcode --- assets/style.scss | 11 +++++++++++ layouts/shortcodes/image.html | 4 ++++ 2 files changed, 15 insertions(+) create mode 100644 layouts/shortcodes/image.html diff --git a/assets/style.scss b/assets/style.scss index 2b7caab..89e78a7 100644 --- a/assets/style.scss +++ b/assets/style.scss @@ -38,6 +38,17 @@ a { text-decoration: none; } +figure { + img { + display: block; + margin: 0 auto; + } + + figcaption { + display: none; + } +} + .nav { max-width: 1200px; margin: 0 auto; diff --git a/layouts/shortcodes/image.html b/layouts/shortcodes/image.html new file mode 100644 index 0000000..b9187a2 --- /dev/null +++ b/layouts/shortcodes/image.html @@ -0,0 +1,4 @@ +
+ {{ .Get +
{{ .Get "alt" }}
+