fix: page header images
This commit is contained in:
parent
a599cb5ebc
commit
397774be5b
2 changed files with 3 additions and 3 deletions
|
@ -15,9 +15,9 @@
|
||||||
|
|
||||||
<!-- Rendering -->
|
<!-- Rendering -->
|
||||||
|
|
||||||
{{- $isResizable := in ( slice "avif" "svg" "gif" ) .MediaType.SubType -}}
|
{{- $isResizable := not ( in ( slice "avif" "svg" "gif" ) .img.MediaType.SubType ) -}}
|
||||||
{{- if $isResizable -}}
|
{{- if $isResizable -}}
|
||||||
{{- with .Resize "1200x webp" -}}
|
{{- with .img.Resize "1200x webp" -}}
|
||||||
{{- .RelPermalink -}}
|
{{- .RelPermalink -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<div class="article-header__featured-image"
|
<div class="article-header__featured-image"
|
||||||
{{ with .pc.Params.featured_image }}
|
{{ with .pc.Params.featured_image }}
|
||||||
{{ with ( $.pc.Resources.GetMatch . ) }}
|
{{ with ( $.pc.Resources.GetMatch . ) }}
|
||||||
style="background-image: url({{ partialCached "images/get-image.html" ( dict "img" . ) . }})"
|
style="background-image: url({{ partialCached "images/get-image.html" ( dict "img" . ) $.pc }})"
|
||||||
{{ else }}
|
{{ else }}
|
||||||
style="background-image: url({{ . }})"
|
style="background-image: url({{ . }})"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue