hugo-theme-next/layouts/_default/_markup/render-blockquote.html
2025-01-03 15:25:04 +08:00

23 lines
593 B
HTML

{{ if eq .Type "alert" }}
{{ $postAlert := site.Params.postAlerts }}
{{ $alertCfg := index $postAlert .AlertType }}
<div class="post-alert-{{ .AlertType }}">
<div class="post-alert-title">
<i class="fa-solid fa-{{ $alertCfg.icon }}"></i>
<span>
{{ with .AlertTitle }}
{{ . }}
{{ else }}
{{ or (T (printf "PostAlert.%s" .AlertType)) (title .AlertType) }}
{{ end }}
</span>
</div>
<div class="post-alert-content">
{{ .Text }}
</div>
</div>
{{ else }}
<blockquote>
{{ .Text }}
</blockquote>
{{ end }}