mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-11-14 15:09:23 +00:00
turned hero into a partial
This commit is contained in:
1 parent
80425321f3
commit
e9a17706ae
4 files changed
+12
-13
No files matched your search
@@ -0,0 +1,10 @@
|
||||
{{ 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 -}}
|
||||
Reference in new issue
Block a user