hugo-toha/layouts/shortcodes/alert.html
hossainemruz a7edb91451 Fix alerts on darkmode
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2024-01-01 14:55:48 +06:00

16 lines
461 B
HTML

{{ $type := .Get "type"}}
{{ $icon := "alert-circle"}}
{{ if eq $type "success" }}
{{ $icon = "check-circle"}}
{{ else if eq $type "warning" }}
{{ $icon = "alert-triangle"}}
{{ else if eq $type "danger" }}
{{ $icon = "alert-octagon"}}
{{ else if eq $type "info" }}
{{ $icon = "info"}}
{{ end }}
<div class="alert {{ $type }}">
<span><i data-feather="{{$icon}}"></i></span>
<span><strong>{{.Inner | markdownify }}</strong></span>
</div>