blob: b49226725a303ae416cd37a1f4a1d799a738aa39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
{{- $type := .Get "type" | default "note" -}}
{{- $title := .Get "title" | default (i18n (printf "callout_%s" $type)) -}}
{{- $role := cond (eq $type "danger") "alert" "note" -}}
{{- $icons := dict "note" "edit-2" "tip" "zap" "info" "info" "warning" "alert-triangle" "danger" "x-circle" "success" "check-circle" -}}
{{- $icon := index $icons $type | default "info" -}}
<div class="callout callout-{{ $type }}" role="{{ $role }}">
<div class="callout-title">
<i data-feather="{{ $icon }}" class="w-3.5 h-3.5" aria-hidden="true"></i>
<span>{{ $title }}</span>
</div>
<div class="callout-body">
{{- .Inner | markdownify -}}
</div>
</div>
|