diff options
Diffstat (limited to 'layouts/partials/cover.html')
| -rw-r--r-- | layouts/partials/cover.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/partials/cover.html b/layouts/partials/cover.html index b4e7c78..5c5f2fb 100644 --- a/layouts/partials/cover.html +++ b/layouts/partials/cover.html @@ -2,8 +2,8 @@ {{- if (and .Params.cover.image (not $.isHidden)) }} {{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }} <figure class="entry-cover"> - {{- $responsiveImages := (.Params.cover.responsiveImages | default .Site.Params.cover.responsiveImages) | default true }} - {{- $addLink := (and .Site.Params.cover.linkFullImages (not $.IsHome)) }} + {{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }} + {{- $addLink := (and site.Params.cover.linkFullImages (not $.IsHome)) }} {{- $cover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} {{- if $cover -}}{{/* i.e it is present in page bundle */}} {{- if $addLink }}<a href="{{ (path.Join .RelPermalink .Params.cover.image) | absURL }}" target="_blank" @@ -13,7 +13,7 @@ {{- if hugo.IsExtended -}} {{- $processableFormats = $processableFormats | append "webp" -}} {{- end -}} - {{- $prod := (hugo.IsProduction | or (eq .Site.Params.env "production")) }} + {{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }} {{- if (and (in $processableFormats $cover.MediaType.SubType) ($responsiveImages) (eq $prod true)) }} <img loading="lazy" srcset="{{- range $size := $sizes -}} {{- if (ge $cover.Width $size) -}} |
