feat: Mise à jour des galleries
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-02-19 12:24:12 +01:00
parent aa8cb94a29
commit 04c6bfcf60
2 changed files with 7 additions and 6 deletions

View File

@ -18,11 +18,11 @@
{{ $orientation := 1 }}
{{ with $image }}{{ with .Exif }}{{ $orientation = .Tags.Orientation }}{{ end }}{{ end }}
{{ if eq $orientation 8 }}
{{ $image = $image.Resize "300x r90" }}
{{ $image = $image.Resize "600x r90" }}
{{ else if eq $orientation 6 }}
{{ $image = $image.Resize "300x r270" }}
{{ $image = $image.Resize "600x r270" }}
{{ end }}
{{ $resized := $image.Resize "300x q100 webp" }}
{{ $resized := $image.Resize "600x q100 webp" }}
<img src="{{ $resized.RelPermalink }}" alt="{{ $title }}" title="{{ $title }}" loading="lazy">
</figure>
{{ end }}