crop les images avec autocrop pour mieux centrer les couvertures de livres
This commit is contained in:
parent
521c59c391
commit
6e9a5d306f
2 changed files with 5 additions and 4 deletions
|
@ -12,7 +12,7 @@
|
|||
{{- $image := .Resources.GetMatch (printf "%s" .Params.cover.image) -}}
|
||||
{{- if $image -}}
|
||||
|
||||
{{- $fittedImage := $image.Fit "400x400 webp q95" -}}
|
||||
{{- $fittedImage := $image.Fill "400x400 smart webp q95" -}}
|
||||
{{- $optimizedBlurredImage := $fittedImage.Filter (images.GaussianBlur 3) -}}
|
||||
<a href="{{ .RelPermalink }}" class="scrolling-posts-item" style="background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0.2)), url('{{ $optimizedBlurredImage.RelPermalink }}');">
|
||||
<span class="section-badge">{{ .Section }}</span>
|
||||
|
@ -31,7 +31,7 @@
|
|||
{{- $image := .Resources.GetMatch (printf "%s" .Params.cover.image) -}}
|
||||
{{- if $image -}}
|
||||
|
||||
{{- $fittedImage := $image.Fit "400x400 webp q95" -}}
|
||||
{{- $fittedImage := $image.Fill "400x400 smart webp q95" -}}
|
||||
{{- $optimizedBlurredImage := $fittedImage.Filter (images.GaussianBlur 3) -}}
|
||||
<a href="{{ .RelPermalink }}" class="scrolling-posts-item" style="background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0.2)), url('{{ $optimizedBlurredImage.RelPermalink }}');">
|
||||
<span class="section-badge">{{ .Section }}</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue