mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-30 11:13:06 +00:00
19 lines
No EOL
537 B
HTML
19 lines
No EOL
537 B
HTML
{{- $alerttype := .AlertType }}
|
|
{{- $text := .Text }}
|
|
{{- if not site.Params.disableBlockquoteNoticeSupport }}
|
|
{{- range findRESubmatch "^(<p>)?\\[!(\\w+)\\]\\n(.*?)(</p>)?\\s*$" $text 1 }}
|
|
{{- $alerttype = lower (index . 2) }}
|
|
{{- $text = printf "%s%s%s" (index . 1) (index . 3) (index . 4) }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if $alerttype }}
|
|
{{- partial "shortcodes/notice.html" (dict
|
|
"page" .Page
|
|
"style" $alerttype
|
|
"content" $text
|
|
) }}
|
|
{{- else }}
|
|
<blockquote>
|
|
{{- $text | safeHTML }}
|
|
</blockquote>
|
|
{{- end }} |