FIX display of content and image of posts, FIX image in link list

This commit is contained in:
Hoernschen 2025-08-11 22:23:40 +02:00
parent 58274050ef
commit e03ec741e6
Signed by: hoernschen
GPG key ID: 37591FAF4E6D3462
3 changed files with 8 additions and 5 deletions

View file

@ -552,7 +552,7 @@ button {
width: 100%;
height: 150px;
border-radius: 5px 5px 0px 0px;
object-fit: cover;
object-fit: contain;
i {
margin: auto;
font-size: 8em;

View file

@ -19,7 +19,7 @@
<div class="cardContent">
{{ if .image }}
{{ $style := "cardImage" }}
{{ if .Params.image.cover }}
{{ if .image.cover }}
{{ $style = "cardImage cover" }}
{{ end }}
{{- partial "components/image.html" (dict "style" $style "url" .image.url "alt" .image.alt) -}}

View file

@ -17,14 +17,17 @@
<a href="{{.Permalink}}">
<div class="cardContent">
{{ if .Params.image }}
{{ $style := "cardImage {{if ne .Params.image.cover }} noCover {{ end }}" }}
{{- partial "components/image.html" (dict "style" $style "url" .image.url "alt" .image.alt) -}}
{{ $style := "cardImage" }}
{{ if .Params.image.cover }}
{{ $style = "cardImage cover" }}
{{ end }}
{{- partial "components/image.html" (dict "style" $style "url" .Params.image.url "alt" .Params.image.alt) -}}
{{ else }}
{{- partial "components/image.html" (dict "style" "cardImage" "url" $defaultimage "alt" "Placeholder") -}}
{{ end }}
<div class="cardTitle">{{.Title}}</div>
<div class="cardDescription">
{{ .Summary | safeHTML | truncate 320 }}
{{ .Summary | plainify | truncate 320 }}
</div>
<div class="cardDetail">
{{.Date.Format "02.01.2006"}} | {{.ReadingTime}} Minuten