From b772b5ed97be898308a28a230bc4430939023d13 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?=
<40151420+ldericher@users.noreply.github.com>
Date: Thu, 8 Aug 2024 02:00:47 +0200
Subject: [PATCH] parameter backgroundImageWidth `default` function usage
---
layouts/partials/hero/background.html | 2 +-
layouts/partials/hero/basic.html | 2 +-
layouts/partials/hero/big.html | 2 +-
layouts/partials/hero/thumbAndBackground.html | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/layouts/partials/hero/background.html b/layouts/partials/hero/background.html
index 2cf1d6ea..66799507 100644
--- a/layouts/partials/hero/background.html
+++ b/layouts/partials/hero/background.html
@@ -41,7 +41,7 @@
style="background-image:url({{ .RelPermalink }});">
{{ end }}
{{ else }}
- {{ with .Resize (print (default "1200" $.Site.Params.backgroundImageWidth) "x") }}
+ {{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
{{ end }}
diff --git a/layouts/partials/hero/basic.html b/layouts/partials/hero/basic.html
index 87ec4f14..f1928003 100644
--- a/layouts/partials/hero/basic.html
+++ b/layouts/partials/hero/basic.html
@@ -26,7 +26,7 @@
{{ end }}
{{ else }}
- {{ with .Resize (print (default "1200" $.Site.Params.backgroundImageWidth) "x") }}
+ {{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
{{ end }}
{{ end }}
diff --git a/layouts/partials/hero/big.html b/layouts/partials/hero/big.html
index 30562f2d..60e59772 100644
--- a/layouts/partials/hero/big.html
+++ b/layouts/partials/hero/big.html
@@ -48,7 +48,7 @@
{{ end }}
{{ else }}
- {{ with .Resize (print (default "1200" $.Site.Params.backgroundImageWidth) "x") }}
+ {{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
{{ end }}
{{ else }}
-{{ with .Resize (print (default "1200" $.Site.Params.backgroundImageWidth) "x") }}
+{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}