feat: Ajout des vignettes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-05-04 21:20:34 +02:00
parent 0a3ceec95d
commit f12cfce40b
4 changed files with 7 additions and 5 deletions

View File

@ -5,7 +5,8 @@
{{ $truncateSize := cond $isBig 180 90}}
<div class="post{{ if $isBig }} big{{ end }}">
<div class="picture">
{{ $image := .Resources.GetMatch (default "**.jpg" .Params.image) }}
{{ $imageName := or .Params.vignette .Params.image }}
{{ $image := .Resources.GetMatch (default "**.jpg" $imageName) }}
<a href="{{ .RelPermalink }}">
{{ if $image }}
{{ $resized := $image.Fill $pictureSize}}