mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-21 04:41:53 +02:00
Update shortcode
This commit is contained in:
parent
47b038a280
commit
095a64b150
1 changed files with 33 additions and 18 deletions
|
@ -1,27 +1,42 @@
|
||||||
{{ $icon := default "triangle-exclamation" (.Get "icon") }}
|
{{ if .IsNamedParams }}
|
||||||
{{ $cardColor := default "NULL" (.Get "cardColor") }}
|
{{ $.Scratch.Set "icon" (default "triangle-exclamation" (.Get "icon") ) }}
|
||||||
{{ $iconColor := default "NULL" (.Get "iconColor") }}
|
{{ $.Scratch.Set "cardColor" (default "NULL" (.Get "cardColor") ) }}
|
||||||
{{ $textColor := default "NULL" (.Get "textColor") }}
|
{{ $.Scratch.Set "iconColor" (default "NULL" (.Get "iconColor") ) }}
|
||||||
|
{{ $.Scratch.Set "textColor" (default "NULL" (.Get "textColor") ) }}
|
||||||
{{ if eq $cardColor "NULL" }}
|
|
||||||
<div class="flex px-4 py-3 rounded-md bg-primary-100 dark:bg-primary-900">
|
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div class="flex px-4 py-3 rounded-md" style="background-color: {{ $cardColor }}">
|
{{ $.Scratch.Set "icon" (default "triangle-exclamation" (.Get 0) ) }}
|
||||||
|
{{ $.Scratch.Set "cardColor" "NULL" }}
|
||||||
|
{{ $.Scratch.Set "iconColor" "NULL" }}
|
||||||
|
{{ $.Scratch.Set "textColor" "NULL" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if eq $iconColor "NULL" }}
|
|
||||||
<span class="text-primary-400 ltr:pr-3 rtl:pl-3 flex items-center">
|
<div
|
||||||
|
{{ if eq ($.Scratch.Get "cardColor") "NULL" }}
|
||||||
|
class="flex px-4 py-3 rounded-md bg-primary-100 dark:bg-primary-900"
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<span class="ltr:pr-3 rtl:pl-3 flex items-center" style="color: {{ $iconColor }}">
|
class="flex px-4 py-3 rounded-md"
|
||||||
{{ end }}
|
style="background-color: {{ $.Scratch.Get "cardColor" }}"
|
||||||
{{ partial "icon.html" $icon }}
|
{{ end }}>
|
||||||
|
|
||||||
|
<span
|
||||||
|
{{ if eq ($.Scratch.Get "iconColor") "NULL" }}
|
||||||
|
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 eq $textColor "NULL" }}
|
<span
|
||||||
<span class="dark:text-neutral-300">
|
{{ if eq ($.Scratch.Get "textColor") "NULL" }}
|
||||||
{{ else }}
|
class="dark:text-neutral-300"
|
||||||
<span style="color: {{ $textColor }}">
|
{{ else }}
|
||||||
{{ end }}
|
style="color: {{ $.Scratch.Get "textColor" }}"
|
||||||
|
{{ end }}>
|
||||||
|
|
||||||
{{- .Inner | markdownify -}}
|
{{- .Inner | markdownify -}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue