From e03ec741e6e66f6fa1c49fa85cc02321365fec08 Mon Sep 17 00:00:00 2001 From: Hoernschen Date: Mon, 11 Aug 2025 22:23:40 +0200 Subject: [PATCH] FIX display of content and image of posts, FIX image in link list --- assets/scss/index.scss | 2 +- layouts/partials/links.html | 2 +- layouts/partials/posts.html | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/assets/scss/index.scss b/assets/scss/index.scss index 2cebf5c..9f84b0e 100644 --- a/assets/scss/index.scss +++ b/assets/scss/index.scss @@ -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; diff --git a/layouts/partials/links.html b/layouts/partials/links.html index b825e43..6f6e458 100644 --- a/layouts/partials/links.html +++ b/layouts/partials/links.html @@ -19,7 +19,7 @@
{{ 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) -}} diff --git a/layouts/partials/posts.html b/layouts/partials/posts.html index b622ee8..167b77e 100644 --- a/layouts/partials/posts.html +++ b/layouts/partials/posts.html @@ -17,14 +17,17 @@
{{ 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 }}
{{.Title}}
- {{ .Summary | safeHTML | truncate 320 }} + {{ .Summary | plainify | truncate 320 }}
{{.Date.Format "02.01.2006"}} | {{.ReadingTime}} Minuten