Files
caldwell/layouts/_default/_markup/render-blockquote.html
2025-09-08 17:30:45 +01:00

27 lines
621 B
HTML

{{ $emoji := dict
"caution" ":exclamation:"
"warning" ":warning:"
"important" ":information_source:"
"tip" ":bulb:"
}}
{{- if eq .Type "alert" -}}
<blockquote class="alert alert-{{ .AlertType }}">
<p class="alert-heading">
<span class="alert-emoji">
{{- transform.Emojify (index $emoji .AlertType) -}}
</span>
{{ if .AlertTitle }}
{{- .AlertTitle -}}
{{ else }}
{{- .AlertType | title -}}
{{ end }}
</p>
{{- .Text -}}
</blockquote>
{{- else -}}
<blockquote>
{{- .Text -}}
</blockquote>
{{- end -}}
{{- /* chomp trailing newline */ -}}