From 04c6bfcf60e9fc314029b5db0b0e3d9991eb3879 Mon Sep 17 00:00:00 2001 From: Simon C Date: Mon, 19 Feb 2024 12:24:12 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20Mise=20=C3=A0=20jour=20des=20galleries?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/styles/css-masonry.sass | 7 ++++--- layouts/shortcodes/gallery.html | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/assets/styles/css-masonry.sass b/assets/styles/css-masonry.sass index 60729a6..92b39a5 100644 --- a/assets/styles/css-masonry.sass +++ b/assets/styles/css-masonry.sass @@ -1,12 +1,13 @@ .masonry column-gap: 30px column-fill: initial + column-count: 2 @media only screen and (min-width: 1024px) - column-count: 4 + column-count: 2 @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) column-count: 2 @@ -32,5 +33,5 @@ img width: 100% - max-width: 300px + max-width: 600px margin: 0 auto 1rem diff --git a/layouts/shortcodes/gallery.html b/layouts/shortcodes/gallery.html index 306efe2..040a49c 100644 --- a/layouts/shortcodes/gallery.html +++ b/layouts/shortcodes/gallery.html @@ -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" }} {{ $title }} {{ end }}