22 lines
712 B
HTML
22 lines
712 B
HTML
{{- $page := . -}}
|
|
{{- $image := "" }}
|
|
{{- with $page.Params.headerimage }}
|
|
<div class="header-image">
|
|
{{- if eq $page.BundleType "leaf" }}
|
|
{{- with $page.Resources.GetMatch .src }}
|
|
{{- $image = . }}
|
|
{{- end }}
|
|
{{- else }}
|
|
{{- with resources.GetMatch (printf "**/%s" .src) }}
|
|
{{- $image = . }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- $processes := .processes | default (slice "fill 1000x440 webp" )}}
|
|
{{- $image = partial "image-processing" (dict "image" $image "processes" $processes "filter" .filter) -}}
|
|
{{- with $image }}
|
|
<img src="{{ .RelPermalink }}" />
|
|
{{- end }}
|
|
{{- with .text }}<p>{{ . | markdownify }}</p>{{ end }}
|
|
</div>
|
|
{{- end }}
|