2020-02-18 09:22:24 +01:00
|
|
|
{{- $inner := .Inner | .Page.RenderString -}}
|
|
|
|
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- $iconMap := dict "note" "fas fa-pencil-alt" -}}
|
|
|
|
{{- $iconMap = dict "abstract" "fas fa-list-ul" | merge $iconMap -}}
|
|
|
|
{{- $iconMap = dict "info" "fas fa-info-circle" | merge $iconMap -}}
|
|
|
|
{{- $iconMap = dict "tip" "fas fa-lightbulb" | merge $iconMap -}}
|
|
|
|
{{- $iconMap = dict "success" "fas fa-check-circle" | merge $iconMap -}}
|
|
|
|
{{- $iconMap = dict "question" "fas fa-question-circle" | merge $iconMap -}}
|
|
|
|
{{- $iconMap = dict "warning" "fas fa-exclamation-triangle" | merge $iconMap -}}
|
|
|
|
{{- $iconMap = dict "failure" "fas fa-times-circle" | merge $iconMap -}}
|
|
|
|
{{- $iconMap = dict "danger" "fas fa-skull-crossbones" | merge $iconMap -}}
|
|
|
|
{{- $iconMap = dict "bug" "fas fa-bug" | merge $iconMap -}}
|
|
|
|
{{- $iconMap = dict "example" "fas fa-list-ol" | merge $iconMap -}}
|
|
|
|
{{- $iconMap = dict "quote" "fas fa-quote-right" | merge $iconMap -}}
|
2020-02-02 14:07:38 +01:00
|
|
|
{{- $iconDetails := "fas fa-angle-down" -}}
|
2019-08-16 21:40:34 +02:00
|
|
|
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- if .IsNamedParams -}}
|
2020-02-02 14:07:38 +01:00
|
|
|
{{- $type := .Get "type" | default "note" -}}
|
2020-04-25 21:25:10 +02:00
|
|
|
{{- if .Get "details" -}}
|
|
|
|
<div class="details admonition {{ $type }}">
|
|
|
|
<div class="details-summary admonition-title">
|
|
|
|
<i class="icon {{ index $iconMap $type | default (index $iconMap "note") }}"></i>{{ .Get "title" | default (T $type) }}<i class="details-icon {{ $iconDetails }}"></i>
|
2020-02-21 16:42:35 +01:00
|
|
|
</div>
|
2020-04-25 21:25:10 +02:00
|
|
|
<div class="details-content">
|
|
|
|
<div class="admonition-content">
|
|
|
|
{{- $inner -}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-08-16 21:40:34 +02:00
|
|
|
{{- else -}}
|
|
|
|
<div class="admonition {{ $type }}">
|
2020-04-25 21:25:10 +02:00
|
|
|
<div class="admonition-title"><i class="icon {{ index $iconMap $type | default (index $iconMap "note") }}"></i>{{ .Get "title" | default (T $type) }}</div>
|
2020-02-21 16:42:35 +01:00
|
|
|
<div class="admonition-content">
|
|
|
|
{{- $inner -}}
|
|
|
|
</div>
|
2019-08-11 19:36:19 +02:00
|
|
|
</div>
|
2019-08-16 21:40:34 +02:00
|
|
|
{{- end -}}
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- else -}}
|
2020-03-08 14:02:21 +01:00
|
|
|
{{- $type := .Get 0 | default "note" -}}
|
|
|
|
{{- if .Get 2 -}}
|
2020-04-25 21:25:10 +02:00
|
|
|
<div class="details admonition {{ $type }}">
|
|
|
|
<div class="details-summary admonition-title">
|
|
|
|
<i class="icon {{ index $iconMap $type | default (index $iconMap "note") }}"></i>{{ .Get 1 | default (T $type) }}<i class="details-icon {{ $iconDetails }}"></i>
|
2020-02-21 16:42:35 +01:00
|
|
|
</div>
|
2020-04-25 21:25:10 +02:00
|
|
|
<div class="details-content">
|
|
|
|
<div class="admonition-content">
|
|
|
|
{{- $inner -}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-08-16 21:40:34 +02:00
|
|
|
{{- else -}}
|
|
|
|
<div class="admonition {{ $type }}">
|
2020-04-25 21:25:10 +02:00
|
|
|
<div class="admonition-title"><i class="icon {{ index $iconMap $type | default (index $iconMap "note") }}"></i>{{ .Get 1 | default (T $type) }}</div>
|
2020-02-21 16:42:35 +01:00
|
|
|
<div class="admonition-content">
|
|
|
|
{{- $inner -}}
|
|
|
|
</div>
|
2019-08-11 19:36:19 +02:00
|
|
|
</div>
|
2019-08-16 21:40:34 +02:00
|
|
|
{{- end -}}
|
2020-02-06 17:10:00 +01:00
|
|
|
{{- end -}}
|