From f04015d274e874700bfd364ba78b731d0ded0faa Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Thu, 28 Sep 2023 10:05:00 +0200 Subject: [PATCH] Better look for incoming posts --- themes/chosto/layouts/_default/summary.html | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/themes/chosto/layouts/_default/summary.html b/themes/chosto/layouts/_default/summary.html index bfe63a1..a6480a2 100644 --- a/themes/chosto/layouts/_default/summary.html +++ b/themes/chosto/layouts/_default/summary.html @@ -1,17 +1,21 @@ -
+
{{ $imageURL := "https://bulma.io/images/placeholders/480x320.png" }} {{ with .Resources.GetMatch "top.jpg" }} {{ $image := .Fill "480x320 left" }} + {{/* #FIXME why do $image gets overwritten when $imageURL is set only once outside the conditional */}} + {{ if $.Params.incoming }}{{ $image = $image.Filter (images.Grayscale)}}{{ $imageURL = $image.Permalink }} + {{ else }} {{ $imageURL = $image.Permalink }} {{ end }} - Placeholder image + {{ end }} + Placeholder image