Correction de l'affichage d'images en mode portrait
This commit is contained in:
@@ -6,14 +6,14 @@
|
|||||||
{{- $display := $image -}}
|
{{- $display := $image -}}
|
||||||
|
|
||||||
{{- if ne $image.MediaType.SubType "svg" -}}
|
{{- if ne $image.MediaType.SubType "svg" -}}
|
||||||
{{- if and (gt $image.Height $image.Width) (ge $image.Height 1080) -}}
|
{{- if and (gt $image.Height 1080) (ge $image.Height (mul $image.Width 2)) -}}
|
||||||
{{- $cropHeight := div (mul $image.Width 9) 16 -}}
|
{{- $cropHeight := div (mul $image.Width 9) 16 -}}
|
||||||
{{- $display = partial "media/process-image.html" (dict
|
{{- $display = partial "media/process-image.html" (dict
|
||||||
"image" $image
|
"image" $image
|
||||||
"action" "Crop"
|
"action" "Crop"
|
||||||
"spec" (printf "%dx%d TopLeft" $image.Width $cropHeight)
|
"spec" (printf "%dx%d TopLeft" $image.Width $cropHeight)
|
||||||
) -}}
|
) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- if gt $display.Width $display.Height -}}
|
{{- if gt $display.Width $display.Height -}}
|
||||||
{{- $maxWidth := 1400 -}}
|
{{- $maxWidth := 1400 -}}
|
||||||
|
|||||||
Reference in New Issue
Block a user