File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {{- $type := lower (default "info" (.Get "type")) -}}
2+ {{- $title := .Get "title" -}}
3+ {{- $icons := dict "info" "fa-info-circle" "warning" "fa-exclamation-triangle" "danger" "fa-exclamation-circle" "success" "fa-check-circle" -}}
4+ {{- $backgrounds := dict "info" "#e0f4ff" "warning" "#fff4e0" "danger" "#ffe3e3" "success" "#e7f5e7" -}}
5+ {{- $borders := dict "info" "#228be6" "warning" "#f08c00" "danger" "#c92a2a" "success" "#2f9e44" -}}
6+ {{- $icon := index $icons $type | default (index $icons "info") -}}
7+ {{- $background := index $backgrounds $type | default (index $backgrounds "info") -}}
8+ {{- $border := index $borders $type | default (index $borders "info") -}}
9+ < div class ="alert-box alert-box-{{$type}} " role ="alert " style ="border-left:4px solid {{$border}}; background-color: {{$background}}; padding:1rem; margin:1rem 0; border-radius:0.5rem; ">
10+ < div style ="display:flex; align-items:flex-start; gap:0.75rem; ">
11+ < i class ="fa {{$icon}} " aria-hidden ="true " style ="font-size:1.75rem; line-height:1; "> </ i >
12+ < div class ="alert-box-content ">
13+ {{- if $title -}}
14+ < p style ="font-weight:600; margin:0 0 0.25rem 0; "> {{$title}}</ p >
15+ {{- end -}}
16+ < div > {{ .Inner | markdownify }}</ div >
17+ </ div >
18+ </ div >
19+ </ div >
You can’t perform that action at this time.
0 commit comments