From c2bc65e9c920317530be6306f247d31b70635e85 Mon Sep 17 00:00:00 2001 From: leovct Date: Wed, 10 May 2023 03:09:36 +0200 Subject: [PATCH] feat: works if no img specified or no img.link specified --- assets/css/common/home-info.css | 2 -- layouts/partials/home_info.html | 15 +++++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/assets/css/common/home-info.css b/assets/css/common/home-info.css index 585f2c80..791d4232 100644 --- a/assets/css/common/home-info.css +++ b/assets/css/common/home-info.css @@ -6,7 +6,6 @@ .home-info-container img { flex: 1; flex-shrink: 0; - width: 100%; height: auto; max-width: 600px; margin-right: 20px; @@ -14,7 +13,6 @@ } .home-info-container ul { - padding-left: 20px; list-style-type: none; } diff --git a/layouts/partials/home_info.html b/layouts/partials/home_info.html index 9c13c470..d1206461 100644 --- a/layouts/partials/home_info.html +++ b/layouts/partials/home_info.html @@ -4,10 +4,17 @@

{{ .title | markdownify }}

- -  {{ .image.title | default - + {{- if .image.url}} + {{- if .image.link -}} + +  {{ .image.title | default + + {{- else }} +  {{ .image.title | default + {{- end }} + {{- end}}
{{ .content | markdownify }}