From c3fa4f512098eea2194b489353df113c2fc6499a Mon Sep 17 00:00:00 2001 From: David Eisinger Date: Mon, 3 Apr 2023 20:57:39 -0400 Subject: [PATCH] Add thumbnail shortcode --- themes/v2/layouts/shortcodes/thumbnail.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 themes/v2/layouts/shortcodes/thumbnail.html diff --git a/themes/v2/layouts/shortcodes/thumbnail.html b/themes/v2/layouts/shortcodes/thumbnail.html new file mode 100644 index 0000000..ccfcb8b --- /dev/null +++ b/themes/v2/layouts/shortcodes/thumbnail.html @@ -0,0 +1,14 @@ +{{ $orig := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) }} +{{ $options := .Get 1 }} +{{ $img := $orig.Fill $options }} + +
+ + +
+ {{ with .Inner }} + {{ . }} + {{ end }} +
+
+