From 2731d9795f44571dce9f1685fa7102cfb694729f Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Tue, 3 May 2022 22:09:18 -0500 Subject: [PATCH] Add see-also shortcode --- assets/css/bobastyle.css | 13 +++++++++++++ layouts/shortcodes/see-also.html | 7 +++++++ 2 files changed, 20 insertions(+) create mode 100644 layouts/shortcodes/see-also.html diff --git a/assets/css/bobastyle.css b/assets/css/bobastyle.css index ad33755..46cec11 100644 --- a/assets/css/bobastyle.css +++ b/assets/css/bobastyle.css @@ -305,6 +305,19 @@ */ +/* See also formating */ +.see-also { + background-color: var(--background-2); + padding: 8px 12px; + border-radius: 8px; + margin: 10px 0; +} + +.see-also p { + margin: 0; +} + + /* Back to top */ #back-to-top { position: fixed; diff --git a/layouts/shortcodes/see-also.html b/layouts/shortcodes/see-also.html new file mode 100644 index 0000000..94d7408 --- /dev/null +++ b/layouts/shortcodes/see-also.html @@ -0,0 +1,7 @@ +
+ {{ with .Site.GetPage (.Get 0) }} +

SEE ALSO: {{ .Title }}

+ {{ else }} + {{ errorf "Page could not be found for see-also shortcode: %s" .Position }} + {{ end }} +