2026-02-12 21:39:21 +01:00
|
|
|
{{- $page := . -}}
|
2026-02-12 22:57:49 +01:00
|
|
|
{{- $image := "" }}
|
2026-02-12 21:39:21 +01:00
|
|
|
{{- with $page.Params.headerimage }}
|
|
|
|
|
<div class="header-image">
|
|
|
|
|
{{- if eq $page.BundleType "leaf" }}
|
|
|
|
|
{{- with $page.Resources.GetMatch .src }}
|
2026-02-12 22:57:49 +01:00
|
|
|
{{- $image = . }}
|
2026-02-12 21:39:21 +01:00
|
|
|
{{- end }}
|
|
|
|
|
{{- else }}
|
|
|
|
|
{{- with resources.GetMatch (printf "**/%s" .src) }}
|
2026-02-12 22:57:49 +01:00
|
|
|
{{- $image = . }}
|
2026-02-12 21:39:21 +01:00
|
|
|
{{- end }}
|
|
|
|
|
{{- end }}
|
2026-02-12 22:57:49 +01:00
|
|
|
{{- $processes := .processes | default (slice "fill 1000x440 webp" )}}
|
2026-02-12 23:59:54 +01:00
|
|
|
{{- $filter := .filter }}
|
|
|
|
|
{{- if not $image }}
|
|
|
|
|
{{- warnf "Header image '%s' not found for page %s" .src $page.RelPermalink }}
|
|
|
|
|
{{- end }}
|
2026-02-12 22:57:49 +01:00
|
|
|
{{- with $image }}
|
2026-02-12 23:59:54 +01:00
|
|
|
{{- $image = partial "image-processing" (dict "image" $image "processes" $processes "filter" $filter) -}}
|
2026-02-14 11:05:08 +01:00
|
|
|
<img src="{{ $image.RelPermalink }}" />
|
2026-02-12 22:57:49 +01:00
|
|
|
{{- end }}
|
2026-02-12 21:39:21 +01:00
|
|
|
{{- with .text }}<p>{{ . | markdownify }}</p>{{ end }}
|
|
|
|
|
</div>
|
|
|
|
|
{{- end }}
|