mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 09:43:06 +00:00
22 lines
No EOL
569 B
HTML
22 lines
No EOL
569 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
|
|
"style" $alerttype
|
|
"title" $alerttitle
|
|
"expanded" (cond (eq $alertsign "+") true (cond (eq $alertsign "-") false ""))
|
|
) }}
|
|
{{- else }}
|
|
<blockquote>
|
|
{{- $text | safeHTML }}
|
|
</blockquote>
|
|
{{- end }} |