feat: Mise à jour des galleries
continuous-integration/drone/push Build is passing Details

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

View File

@ -1,12 +1,13 @@
.masonry .masonry
column-gap: 30px column-gap: 30px
column-fill: initial column-fill: initial
column-count: 2
@media only screen and (min-width: 1024px) @media only screen and (min-width: 1024px)
column-count: 4 column-count: 2
@media only screen and (max-width: 1023px) and (min-width: 768px) @media only screen and (max-width: 1023px) and (min-width: 768px)
column-count: 3 column-count: 2
@media only screen and (max-width: 767px) and (min-width: 540px) @media only screen and (max-width: 767px) and (min-width: 540px)
column-count: 2 column-count: 2
@ -32,5 +33,5 @@
img img
width: 100% width: 100%
max-width: 300px max-width: 600px
margin: 0 auto 1rem margin: 0 auto 1rem

View File

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