mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 05:36:07 +01:00
25 lines
No EOL
501 B
HTML
25 lines
No EOL
501 B
HTML
{{ $emojis := dict
|
||
"caution" "🚨"
|
||
"important" "❕"
|
||
"note" "ℹ️"
|
||
"tip" "💡"
|
||
"warning" "⚠️"
|
||
}}
|
||
|
||
{{ if eq .Type "alert" }}
|
||
<blockquote class="alert alert-{{ .AlertType }}">
|
||
<p class="alert-heading">
|
||
{{ index $emojis .AlertType }}
|
||
{{ with .AlertTitle }}
|
||
{{ . }}
|
||
{{ else }}
|
||
{{ or (i18n .AlertType) (title .AlertType) }}
|
||
{{ end }}
|
||
</p>
|
||
{{ .Text }}
|
||
</blockquote>
|
||
{{ else }}
|
||
<blockquote>
|
||
{{ .Text }}
|
||
</blockquote>
|
||
{{ end }} |