Files
hugo-theme-stack/layouts/_markup/render-blockquote.html
T

26 lines
771 B
HTML
Raw Normal View History

{{ if eq .Type "alert" }}
{{- $type := .AlertType -}}
{{- $icons := site.Params.article.alertIcon -}}
{{- $icon := index $icons $type -}}
<blockquote class="alert alert-{{ $type }}">
2026-02-19 02:43:34 +08:00
<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 -}}
2026-02-19 02:43:34 +08:00
</span>
</div>
<div class="alert-body">
{{ .Text }}
</div>
</blockquote>
{{ else }}
<blockquote>
2026-02-19 02:43:34 +08:00
{{ .Text }}
</blockquote>
{{ end }}