From 8c996fb3403010bd09db34b90b84c4a3533e4b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 3 Feb 2023 20:45:41 +0000 Subject: [PATCH] refactored alert shortcode --- layouts/shortcodes/alert.html | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/layouts/shortcodes/alert.html b/layouts/shortcodes/alert.html index cae61671..e2001feb 100644 --- a/layouts/shortcodes/alert.html +++ b/layouts/shortcodes/alert.html @@ -1,18 +1,15 @@ {{ if .IsNamedParams }} {{ $.Scratch.Set "icon" (default "triangle-exclamation" (.Get "icon") ) }} - {{ $.Scratch.Set "cardColor" (default "NULL" (.Get "cardColor") ) }} - {{ $.Scratch.Set "iconColor" (default "NULL" (.Get "iconColor") ) }} - {{ $.Scratch.Set "textColor" (default "NULL" (.Get "textColor") ) }} + {{ $.Scratch.Set "cardColor" (.Get "cardColor") }} + {{ $.Scratch.Set "iconColor" (.Get "iconColor") }} + {{ $.Scratch.Set "textColor" (.Get "textColor") }} {{ else }} {{ $.Scratch.Set "icon" (default "triangle-exclamation" (.Get 0) ) }} - {{ $.Scratch.Set "cardColor" "NULL" }} - {{ $.Scratch.Set "iconColor" "NULL" }} - {{ $.Scratch.Set "textColor" "NULL" }} {{ end }}