Refactor alert shortcode (#858)
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
parent
d3968ca711
commit
fdfee4d3bb
4 changed files with 93 additions and 2 deletions
|
@ -1,3 +1,16 @@
|
|||
<div class="alert alert-{{ .Get "type"}}">
|
||||
<strong>{{.Inner | markdownify }}</strong>
|
||||
{{ $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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue