diff options
Diffstat (limited to 'themes/blowfish/layouts/shortcodes/alert.html')
-rw-r--r-- | themes/blowfish/layouts/shortcodes/alert.html | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/themes/blowfish/layouts/shortcodes/alert.html b/themes/blowfish/layouts/shortcodes/alert.html new file mode 100644 index 0000000..e2001fe --- /dev/null +++ b/themes/blowfish/layouts/shortcodes/alert.html @@ -0,0 +1,39 @@ +{{ if .IsNamedParams }} + {{ $.Scratch.Set "icon" (default "triangle-exclamation" (.Get "icon") ) }} + {{ $.Scratch.Set "cardColor" (.Get "cardColor") }} + {{ $.Scratch.Set "iconColor" (.Get "iconColor") }} + {{ $.Scratch.Set "textColor" (.Get "textColor") }} +{{ else }} + {{ $.Scratch.Set "icon" (default "triangle-exclamation" (.Get 0) ) }} +{{ end }} + + +<div + {{ if not ($.Scratch.Get "cardColor") }} + class="flex px-4 py-3 rounded-md bg-primary-100 dark:bg-primary-900" + {{ else }} + class="flex px-4 py-3 rounded-md" + style="background-color: {{ $.Scratch.Get "cardColor" }}" + {{ end }}> + + <span + {{ if not ($.Scratch.Get "iconColor") }} + class="text-primary-400 ltr:pr-3 rtl:pl-3 flex items-center" + {{ else }} + class="ltr:pr-3 rtl:pl-3 flex items-center" + style="color: {{ $.Scratch.Get "iconColor" }}" + {{ end }}> + + {{ partial "icon.html" ($.Scratch.Get "icon") }} + </span> + + <span + {{ if not ($.Scratch.Get "textColor") }} + class="dark:text-neutral-300" + {{ else }} + style="color: {{ $.Scratch.Get "textColor" }}" + {{ end }}> + + {{- .Inner | markdownify -}} + </span> +</div> |