fix header image of blog posts sometimes being clipped
All checks were successful
/ build (pull_request) Successful in 40s
All checks were successful
/ build (pull_request) Successful in 40s
This commit is contained in:
parent
40bd847ba5
commit
d94b6f74dd
2 changed files with 16 additions and 9 deletions
|
|
@ -454,12 +454,17 @@ div.nav-aside {
|
||||||
margin: 15px var(--block-spacing-horizontal);
|
margin: 15px var(--block-spacing-horizontal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.image-container {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
padding: 15px var(--block-spacing-horizontal);
|
padding: 15px var(--block-spacing-horizontal);
|
||||||
width: 100%;
|
max-width: 100%;
|
||||||
height: 25cqw;
|
max-height: 100%;
|
||||||
object-fit: cover;
|
}
|
||||||
object-position: top;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,10 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
{{- if isset .Params "header" }}
|
{{- if isset .Params "header" }}
|
||||||
|
<div class="image-container">
|
||||||
{{- $img := .Resources.GetMatch .Params.header.image }}
|
{{- $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 }}
|
{{- end }}
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue