From 538bd81ef8a2b6e998e41870d522051d95d662e8 Mon Sep 17 00:00:00 2001 From: Richard Dern Date: Tue, 7 Apr 2026 16:05:56 +0200 Subject: [PATCH] Correction de l'affichage d'images en mode portrait --- .../layouts/_partials/media/display-img.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/themes/2026/layouts/_partials/media/display-img.html b/themes/2026/layouts/_partials/media/display-img.html index 1016c378..d64ca59b 100644 --- a/themes/2026/layouts/_partials/media/display-img.html +++ b/themes/2026/layouts/_partials/media/display-img.html @@ -6,14 +6,14 @@ {{- $display := $image -}} {{- if ne $image.MediaType.SubType "svg" -}} - {{- if and (gt $image.Height $image.Width) (ge $image.Height 1080) -}} - {{- $cropHeight := div (mul $image.Width 9) 16 -}} - {{- $display = partial "media/process-image.html" (dict - "image" $image - "action" "Crop" - "spec" (printf "%dx%d TopLeft" $image.Width $cropHeight) - ) -}} - {{- end -}} +{{- if and (gt $image.Height 1080) (ge $image.Height (mul $image.Width 2)) -}} + {{- $cropHeight := div (mul $image.Width 9) 16 -}} + {{- $display = partial "media/process-image.html" (dict + "image" $image + "action" "Crop" + "spec" (printf "%dx%d TopLeft" $image.Width $cropHeight) + ) -}} +{{- end -}} {{- if gt $display.Width $display.Height -}} {{- $maxWidth := 1400 -}}