aboutsummaryrefslogtreecommitdiffstats
path: root/code/frontpage/layouts/shortcodes/alert.html
blob: e2abe8ed303cf7543ee627d1445870fccc2bc33d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
<div class="alert alert-{{ with .Get "context" }}{{.}}{{ else }}doks{{ end }} d-flex" role="alert">
  <div class="flex-shrink-1 alert-icon">{{ with .Get "icon" }}{{.}} {{ end }}</div>
  {{ with .Get "text"}}
    <div class="w-100">{{ . | safeHTML }} </div>
  {{ else }}
    {{ with .Inner}}
      <div class="w-100"> {{ . | markdownify}}</div>
    {{ else }}
      {{ errorf "No valid text variable or Inner content given"}}
    {{ end }}
  {{ end}}
</div>