From 19b9131073d1da80cc0193af397d5a1ab267f45d Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Fri, 20 Oct 2023 16:06:53 +0200 Subject: Project single page --- layouts/partials/leading_image.html | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 layouts/partials/leading_image.html (limited to 'layouts/partials/leading_image.html') diff --git a/layouts/partials/leading_image.html b/layouts/partials/leading_image.html new file mode 100644 index 0000000..ac528d3 --- /dev/null +++ b/layouts/partials/leading_image.html @@ -0,0 +1,30 @@ +{{ $image := "" }} +{{ if (.Resources.ByType "image").GetMatch "*featured*" }} + {{ $image = (.Resources.ByType "image").GetMatch "*featured*" }} +{{ else if resources.Get (index .Params.images 0) }} + {{ $image = resources.Get (index .Params.images 0) }} +{{ end }} +{{ with $image }} +
+
+ {{ .Title }} + {{ with $.Params.caption }} + + {{ .text }} + + {{ end }} +
+
+{{ end }} -- cgit v1.2.3