Rinkusu/layouts/shortcodes/alert.html

13 lines
547 B
HTML
Raw Permalink Normal View History

2022-05-09 21:21:13 +02:00
<div class="alert {{ with .Get "theme" }}alert-{{.}}{{ end }}" role="alert" data-dir="{{ with .Get "dir" }}{{.}}{{ else }}ltr{{ end }}">
{{ $alert := .Get "theme" }}
{{ if findRE "info" $alert }}
<i class="nf nf-fa-info_circle" style="font-size: 28px;"></i>
{{ else if findRE "warning" $alert }}
<i class="nf nf-fa-warning" style="font-size: 28px;"></i>
{{ else if findRE "danger" $alert }}
<i class="nf nf-oct-stop" style="font-size: 28px;"></i>
{{ end }}
{{ .Inner | markdownify }}
</div>