From 22f1890a9beab11d8cfdceba3a4d66f8bbbb468c Mon Sep 17 00:00:00 2001 From: Ian Lewis Date: Fri, 29 Mar 2019 22:40:11 -0400 Subject: Initial commit --- 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 000000000..5756999db --- /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