fix header image of blog posts sometimes being clipped
All checks were successful
/ build (pull_request) Successful in 40s

This commit is contained in:
lilly 2026-05-23 15:10:43 +02:00
commit d94b6f74dd
Signed by: lilly
SSH key fingerprint: SHA256:y9T5GFw2A20WVklhetIxG1+kcg/Ce0shnQmbu1LQ37g
2 changed files with 16 additions and 9 deletions

View file

@ -454,12 +454,17 @@ div.nav-aside {
margin: 15px var(--block-spacing-horizontal);
}
.image-container {
margin: 0;
padding: 0;
display: flex;
justify-content: center;
img {
padding: 15px var(--block-spacing-horizontal);
width: 100%;
height: 25cqw;
object-fit: cover;
object-position: top;
max-width: 100%;
max-height: 100%;
}
}
}

View file

@ -46,8 +46,10 @@
{{- end }}
</div>
{{- if isset .Params "header" }}
<div class="image-container">
{{- $img := .Resources.GetMatch .Params.header.image }}
<img class="container" src="{{ $img.RelPermalink }}" alt="{{ .Params.header.caption }}" />
<img src="{{ $img.RelPermalink }}" alt="{{ .Params.header.caption }}" />
{{- end }}
</div>
</header>
{{- end }}