From 5fd952cc72ca8221b05d2f522757f433161e425c Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Mon, 21 Aug 2023 17:31:43 +0200 Subject: [PATCH] Use column flexbox in cards ; reduce wasted space --- themes/chosto/layouts/_default/list.html | 2 +- themes/chosto/layouts/_default/summary.html | 29 ++++++++++++--------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/themes/chosto/layouts/_default/list.html b/themes/chosto/layouts/_default/list.html index 7364cc7..a1af520 100644 --- a/themes/chosto/layouts/_default/list.html +++ b/themes/chosto/layouts/_default/list.html @@ -14,7 +14,7 @@ ".Params.incoming" "!=" true) }} {{ range $paginator.Pages }} -
+
{{ .Render "summary" }}
{{ end }} diff --git a/themes/chosto/layouts/_default/summary.html b/themes/chosto/layouts/_default/summary.html index 6f891e1..61e48ef 100644 --- a/themes/chosto/layouts/_default/summary.html +++ b/themes/chosto/layouts/_default/summary.html @@ -1,4 +1,4 @@ -
+
{{ $imageURL := "https://bulma.io/images/placeholders/480x320.png" }} @@ -9,9 +9,9 @@ Placeholder image
-
-
- +
+ -
- {{/* If a special summary (before ToC) have been defined, +
+
+
+
+ {{/* If a special summary (before ToC) have been defined, prefer using it because it has more chances to be a better summary */}} - {{ if (isset .Params "summary" )}} - {{ .Params.summary }} - {{ else }} - {{ .Content | plainify | safeHTML | truncate 300 "..." }} - {{ end }} + {{ if (isset .Params "summary" )}} + {{ .Params.summary }} + {{ else }} + {{ .Content | plainify | safeHTML | truncate 300 "..." }} + {{ end }} +