2021-09-12 07:44:34 +00:00
|
|
|
{{- $_hugo_config := `{ "version": 1 }` }}
|
2022-05-23 22:37:03 +00:00
|
|
|
{{- $style := .Get "style" | default (.Get 0) | default "default" }}
|
|
|
|
{{- $title := .Get "title" | default (.Get 1) | default ($style | T) }}
|
|
|
|
{{- $icon := .Get "icon" | default (.Get 2) | default "" }}
|
2022-03-07 08:37:18 +00:00
|
|
|
{{- if and (not $icon) (eq (len $icon) 0) }}
|
|
|
|
{{- if eq $style "info" }}{{ $icon = default "info-circle" }}{{ end }}
|
|
|
|
{{- if eq $style "warning" }}{{ $icon = default "exclamation-triangle" }}{{ end }}
|
|
|
|
{{- if eq $style "note" }}{{ $icon = default "exclamation-circle" }}{{ end }}
|
|
|
|
{{- if eq $style "tip" }}{{ $icon = default "lightbulb " }}{{ end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- $icon = trim $icon " " }}
|
2022-02-16 00:38:44 +00:00
|
|
|
<div class="box notices {{ $style }}">
|
2022-03-07 08:37:18 +00:00
|
|
|
<div class="box-label">{{ if $icon }}<i class="fas fa-{{ $icon }} fa-fw"></i> {{ end }}{{ $title }}</div>
|
2022-02-16 00:38:44 +00:00
|
|
|
<div class="box-content">
|
2022-05-23 22:37:03 +00:00
|
|
|
{{ .Inner }} </div>
|
2021-09-12 07:44:34 +00:00
|
|
|
</div>
|