From f58b77ae9c5679af0adc72fb834539e78a4bab8e Mon Sep 17 00:00:00 2001 From: Richard Dern Date: Sun, 5 Apr 2026 15:40:19 +0200 Subject: [PATCH] =?UTF-8?q?Correction=20des=20miniatures=20des=20fichiers?= =?UTF-8?q?=20compl=C3=A9mentaires?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/2026/assets/css/content.css | 7 ++++--- .../layouts/_partials/asides/complementary-images.html | 8 ++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/themes/2026/assets/css/content.css b/themes/2026/assets/css/content.css index 07d4ef7d..381c9e83 100644 --- a/themes/2026/assets/css/content.css +++ b/themes/2026/assets/css/content.css @@ -744,6 +744,7 @@ main > article > section.article-asides section.article-complementary-files > ul main > article > section.article-asides section.article-complementary-files > ul > li > a { display: block; + padding: var(--space-1); border: 1px solid var(--color-border); background: rgba(255, 255, 255, 0.03); } @@ -754,9 +755,9 @@ main > article > section.article-asides section.article-complementary-files > ul main > article > section.article-asides section.article-complementary-files > ul > li > a > img { display: block; - width: 100%; - aspect-ratio: 4 / 3; - object-fit: cover; + max-width: 100%; + height: auto; + margin-inline: auto; } main > article > section.article-asides section.article-dossier-summary nav[aria-label="Sommaire du dossier"] { diff --git a/themes/2026/layouts/_partials/asides/complementary-images.html b/themes/2026/layouts/_partials/asides/complementary-images.html index 665f9ebc..f64335bc 100644 --- a/themes/2026/layouts/_partials/asides/complementary-images.html +++ b/themes/2026/layouts/_partials/asides/complementary-images.html @@ -105,12 +105,8 @@ {{- end -}} {{- $title := default (printf "Image complémentaire : %s" $imageName) (index $data "title") -}} {{- $thumbnail := . -}} - {{- if and (ne .MediaType.SubType "svg") (gt .Width 360) -}} - {{- $thumbnail = partial "media/process-image.html" (dict - "image" . - "action" "Resize" - "spec" "360x" - ) -}} + {{- if and (ne .MediaType.SubType "svg") (or (gt .Width 360) (gt .Height 270)) -}} + {{- $thumbnail = .Fit "360x270 webp q80" -}} {{- end -}}