blowfish/layouts/partials/hero.html
2022-10-15 21:53:19 +01:00

10 lines
No EOL
471 B
HTML

{{ if .Params.showHero | default (.Site.Params.article.showHero | default false) }}
{{- $images := .Resources.ByType "image" -}}
{{- $featured := $images.GetMatch "*feature*" -}}
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
{{- with $featured -}}
{{ with .Resize "600x" }}
<div class="w-full h-36 md:h-56 lg:h-72 single_hero nozoom" style="background-image:url({{ .RelPermalink }});"></div>
{{ end }}
{{- end -}}
{{- end -}}