From 568553394d0a8b34668a75c9839a0f1f426469b2 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sun, 6 Oct 2019 21:10:46 +0200 Subject: theme: Switch to docsy theme --- themes/docsy/layouts/partials/featured-image.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 themes/docsy/layouts/partials/featured-image.html (limited to 'themes/docsy/layouts/partials/featured-image.html') diff --git a/themes/docsy/layouts/partials/featured-image.html b/themes/docsy/layouts/partials/featured-image.html new file mode 100644 index 0000000..5756999 --- /dev/null +++ b/themes/docsy/layouts/partials/featured-image.html @@ -0,0 +1,14 @@ +{{ $w := .w | default 480 }} +{{ $h := .h | default 180 }} +{{ $p := .p }} +{{ $class := .class | default "ml-3" }} +{{ $image := ($p.Resources.ByType "image").GetMatch "**featured*" }} +{{ with $image }} +{{ $image := .Fill (printf "%dx%d" $w $h ) }} +
+Featured Image for {{ $p.Title }} +{{ with $image.Params.byline }} +
{{ . | html }}
+{{ end }} +
+{{ end }} \ No newline at end of file -- cgit v1.2.3