added multiple options to display hero images

This commit is contained in:
Nuno Coração committed 2022-10-16 16:49:52 +01:00
1 parent c14de64d8d
commit 95796f56f2
25 files changed
+226 -27

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
{{- $images := .Resources.ByType "image" -}}
{{- $featured := $images.GetMatch "*feature*" -}}
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
{{- with $featured -}}
{{ with .Resize "1200x" }}
<div class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
{{ end }}
{{- end -}}