mirror of
https://github.com/imfing/hextra.git
synced 2025-08-24 06:26:40 -04:00
21 lines
599 B
HTML
21 lines
599 B
HTML
![]() |
{{- $supportedAlertTypes := slice "note" "tip" "important" "warning" "caution" -}}
|
||
|
{{- $emojis := dict
|
||
|
"note" ":memo:"
|
||
|
"tip" ":bulb:"
|
||
|
"important" ":information_source:"
|
||
|
"warning" ":warning:"
|
||
|
"caution" ":exclamation:"
|
||
|
-}}
|
||
|
|
||
|
{{- if not (in $supportedAlertTypes .AlertType) -}}
|
||
|
<blockquote>
|
||
|
{{- .Text -}}
|
||
|
</blockquote>
|
||
|
{{- else -}}
|
||
|
{{- $emoji := emojify (index $emojis .AlertType) -}}
|
||
|
{{- $content := .Text -}}
|
||
|
{{- $icon := "" -}}
|
||
|
{{- $class := "" -}}
|
||
|
{{- partial "shortcodes/callout.html" (dict "content" $content "emoji" $emoji "icon" $icon "class" $class) -}}
|
||
|
{{- end -}}
|