blog/themes/stack/layouts/_markup/render-blockquote.html
2026-07-31 15:38:57 +08:00

26 lines
771 B
HTML

{{ if eq .Type "alert" }}
{{- $type := .AlertType -}}
{{- $icons := site.Params.article.alertIcon -}}
{{- $icon := index $icons $type -}}
<blockquote class="alert alert-{{ $type }}">
<div class="alert-header">
<span class="alert-icon">
{{- $icon -}}
</span>
<span class="alert-title">
{{- with .AlertTitle -}}
{{ . }}
{{- else -}}
{{ or (i18n (printf "article.alert.%s" $type)) (title $type) }}
{{- end -}}
</span>
</div>
<div class="alert-body">
{{ .Text }}
</div>
</blockquote>
{{ else }}
<blockquote>
{{ .Text }}
</blockquote>
{{ end }}