💄 Add github alert blockquote in markdown.

This commit is contained in:
elkan1788
2025-01-03 15:25:04 +08:00
parent edb57eea34
commit 9aaaf388f8
25 changed files with 283 additions and 36 deletions

View File

@@ -0,0 +1,23 @@
{{ 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 }}