diff --git a/layouts/partials/media/process-image.html b/layouts/partials/media/process-image.html index 25312609..119d0c76 100644 --- a/layouts/partials/media/process-image.html +++ b/layouts/partials/media/process-image.html @@ -24,6 +24,8 @@ {{- $result = $image.Crop $options -}} {{- else if eq $action "Resize" -}} {{- $result = $image.Resize $options -}} + {{- else if eq $action "Fit" -}} + {{- $result = $image.Fit $options -}} {{- else -}} {{- errorf "media/process-image.html: unsupported image action %q for %q" $action $image.Name -}} {{- end -}} diff --git a/themes/2026/assets/css/article-header.css b/themes/2026/assets/css/article-header.css index 605ccf4e..c6aab611 100644 --- a/themes/2026/assets/css/article-header.css +++ b/themes/2026/assets/css/article-header.css @@ -56,6 +56,8 @@ .article-header .article-cover { margin-top: 0; + display: flex; + justify-content: flex-end; } .article-header .article-cover > a { @@ -63,8 +65,9 @@ } .article-header .article-cover img { - width: 100%; + width: auto; height: auto; + max-height: 90vh; } .article-header .article-meta { diff --git a/themes/2026/layouts/_partials/article-header.html b/themes/2026/layouts/_partials/article-header.html index e2cda952..0bd817d4 100644 --- a/themes/2026/layouts/_partials/article-header.html +++ b/themes/2026/layouts/_partials/article-header.html @@ -106,14 +106,10 @@ {{- if $coverImage -}} {{- $coverDisplay = $coverImage -}} {{- if ne $coverDisplay.MediaType.SubType "svg" -}} - {{- $coverWidth := $coverDisplay.Width -}} - {{- if gt $coverDisplay.Width 1480 -}} - {{- $coverWidth = 1480 -}} - {{- end -}} {{- $coverDisplay = partial "media/process-image.html" (dict "image" $coverImage - "action" "Resize" - "spec" (printf "%dx" $coverWidth) + "action" "Fit" + "spec" "1480x900" ) -}} {{- end -}} {{- end -}}