Skip to content

Commit

Permalink
Re-style new alert shortcode in a more Bootstrap-friendly way
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti committed Feb 12, 2024
1 parent 2541cbf commit 6d6c434
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
8 changes: 3 additions & 5 deletions assets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
$blue: #0969da;
$success: rgba(213, 255, 230, 1);
$danger: rgba(255, 213, 213, 1);
$warning: #ffff6a;

// Required components
@import "../vendor/bootstrap/scss/variables";
Expand Down Expand Up @@ -126,9 +127,6 @@ article table {
@extend .mt-4;
}

.alert {
background-color: #fffdbd;
padding: 10px;
border: 1px solid #ccc;
margin-bottom: 15px;
.alert > :last-child {
@extend .mb-0;
}
12 changes: 6 additions & 6 deletions layouts/shortcodes/alert.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ $heading := .Get 0 }}

<div class="alert">
<h5>{{ $heading | markdownify }}</h5>
<p>{{ .Inner | markdownify }}</p>
</div>
{{ $heading := .Get 0 }}

<div class="alert alert-warning" role="alert">
<h5>{{ $heading | markdownify }}</h5>
<p>{{ .Inner | markdownify }}</p>
</div>

0 comments on commit 6d6c434

Please sign in to comment.