mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 03:53:30 +08:00
refactor: use .Fill for cover image
This commit is contained in:
parent
d9bec10b49
commit
f121999ecf
@ -10,8 +10,8 @@
|
||||
{{- $Srcset := "" -}}
|
||||
|
||||
{{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}}
|
||||
{{- $thumbnail := $image.resource.Fill "800x250" -}}
|
||||
{{- $thumbnailRetina := $image.resource.Fill "1600x500" -}}
|
||||
{{- $thumbnail := $image.resource.Resize "800x" -}}
|
||||
{{- $thumbnailRetina := $image.resource.Resize "1600x" -}}
|
||||
{{- $Srcset = printf "%s 800w, %s 1600w" $thumbnail.RelPermalink $thumbnailRetina.RelPermalink -}}
|
||||
{{- $Permalink = $thumbnail.RelPermalink -}}
|
||||
{{- $Width = $thumbnail.Width -}}
|
||||
|
Loading…
Reference in New Issue
Block a user