From d94b6f74dd0d6cdb14b05415c5b0db1c9c56ca45 Mon Sep 17 00:00:00 2001
From: lilly
Date: Sat, 23 May 2026 15:10:43 +0200
Subject: [PATCH] fix header image of blog posts sometimes being clipped
---
themes/ccchh/assets/sass/main.scss | 17 +++++++++++------
themes/ccchh/layouts/partials/blog-header.html | 8 +++++---
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/themes/ccchh/assets/sass/main.scss b/themes/ccchh/assets/sass/main.scss
index 6392abb..0396a7e 100644
--- a/themes/ccchh/assets/sass/main.scss
+++ b/themes/ccchh/assets/sass/main.scss
@@ -454,12 +454,17 @@ div.nav-aside {
margin: 15px var(--block-spacing-horizontal);
}
- img {
- padding: 15px var(--block-spacing-horizontal);
- width: 100%;
- height: 25cqw;
- object-fit: cover;
- object-position: top;
+ .image-container {
+ margin: 0;
+ padding: 0;
+ display: flex;
+ justify-content: center;
+
+ img {
+ padding: 15px var(--block-spacing-horizontal);
+ max-width: 100%;
+ max-height: 100%;
+ }
}
}
diff --git a/themes/ccchh/layouts/partials/blog-header.html b/themes/ccchh/layouts/partials/blog-header.html
index a9ac6bb..c3750f7 100644
--- a/themes/ccchh/layouts/partials/blog-header.html
+++ b/themes/ccchh/layouts/partials/blog-header.html
@@ -46,8 +46,10 @@
{{- end }}
{{- if isset .Params "header" }}
- {{- $img := .Resources.GetMatch .Params.header.image }}
-
- {{- end }}
+
+ {{- $img := .Resources.GetMatch .Params.header.image }}
+

+ {{- end }}
+
{{- end }}