From b51c6c257fa265bb4e4a8791234412d10787d1ed Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Tue, 19 Oct 2021 12:40:34 -0500 Subject: [PATCH] Add figure shortcode --- assets/css/bobastyle.css | 6 ++++++ layouts/shortcodes/figure.html | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 layouts/shortcodes/figure.html diff --git a/assets/css/bobastyle.css b/assets/css/bobastyle.css index 1a4e473..1ee68e5 100644 --- a/assets/css/bobastyle.css +++ b/assets/css/bobastyle.css @@ -106,6 +106,12 @@ img:not(.noborder), video:not(.noborder) { border: 5px solid #1b5b9b; } +figcaption { + font-style: italic; + font-size: small; + text-align: center; +} + a { color: #4da6ff; text-decoration: inherit; diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html new file mode 100644 index 0000000..fc510af --- /dev/null +++ b/layouts/shortcodes/figure.html @@ -0,0 +1,24 @@ +
+ + {{ if .Get "href" }}{{ end }} + {{ with .Get + {{ if .Get "href" }}{{ end }} + + {{ with .Get "caption" }} +
+ {{ . | markdownify }} +
+ {{ end }} + +