Skip to content

Commit

Permalink
feat(alert): simplify usage with Markdown content (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang authored Jan 14, 2024
1 parent 0351562 commit ce8ace1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions assets/mods/bootstrap/scss/_alert.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.alert-content {
> p:last-child {
margin-bottom: 0 !important;
}
}
1 change: 1 addition & 0 deletions assets/mods/bootstrap/scss/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import 'alert';
4 changes: 2 additions & 2 deletions layouts/partials/bootstrap/alert-heading.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="alert-heading h5 d-flex">
{{ partial "bootstrap/alert-icon" (cond .Parent.IsNamedParams (.Parent.Get "style") (.Parent.Get 0)) }}
{{ .Get 0 }}
{{- partial "bootstrap/alert-icon" (cond .Parent.IsNamedParams (.Parent.Get "style") (.Parent.Get 0)) -}}
{{- .Get 0 -}}
</div>
4 changes: 3 additions & 1 deletion layouts/partials/bootstrap/alert.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@
{{- if not (findRE `alert-heading` .Inner) }}
{{ partial "bootstrap/alert-icon" $style }}
{{- end }}
<div class="alert-content">{{ .Inner }}</div>
<div class="alert-content">
{{ .Inner }}
</div>
</div>

0 comments on commit ce8ace1

Please sign in to comment.