Files
FixIt/layouts/_default/_markup/render-blockquote.html
T
2024-08-30 10:42:51 +08:00

12 lines
415 B
HTML

{{- $attrs := "" }}
{{- range $key, $value := .Attributes }}
{{- $attrs = printf "%s %s=%q" $attrs $key $value }}
{{- end }}
{{- $attrs = trim $attrs " " }}
{{- if eq .Type "alert" -}}
{{- dict "Text" .Text "Type" .AlertType "Attributes" .Attributes | partial "plugin/alert.html" -}}
{{- else -}}
<blockquote {{- with $attrs }} {{ . | safeHTMLAttr }}{{ end }}>{{ .Text | safeHTML }}</blockquote>
{{- end -}}