hugo-theme-relearn/layouts/_default/_markup/render-blockquote.html
Sören Weber 66f4fbf5f0
Some checks failed
docs-build-deployment / Run deploy (push) Has been cancelled
docs-build / Run build (push) Has been cancelled
details: add shortcode #957
2024-12-15 15:35:13 +01:00

21 lines
No EOL
564 B
HTML

{{- $alerttype := .AlertType }}
{{- $alerttitle := "" }}
{{- $alertsign := "" }}
{{- $hugoVersion := "0.134.0" }}
{{- if ge hugo.Version $hugoVersion }}
{{- $alerttitle = .AlertTitle }}
{{- $alertsign = .AlertSign }}
{{- end }}
{{- $text := .Text }}
{{- if $alerttype }}
{{- partial "shortcodes/notice.html" (dict
"page" .Page
"content" $text
"expanded" (cond (eq $alertsign "+") true (cond (eq $alertsign "-") false ""))
"style" $alerttype
"title" $alerttitle
) }}
{{ else -}}
<blockquote>
{{ $text | safeHTML }}</blockquote>
{{ end }}