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