26 lines
771 B
HTML
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 }} |