mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
add default background image to theme
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{{- $images := .Resources.ByType "image" -}}
|
||||
{{- $featured := $images.GetMatch "*feature*" -}}
|
||||
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
||||
{{- if not $featured }}{{ with .Site.Params.defaultBackgroundImage }}{{ $featured = resources.Get . }}{{ end }}{{ end -}}
|
||||
{{- with $featured -}}
|
||||
{{ with .Resize "1200x" }}
|
||||
<div id="hero" class="h-[150px] md:h-[200px]"></div>
|
||||
@@ -23,4 +24,4 @@
|
||||
</script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user