Skip to content

Commit

Permalink
Fix toast long messages and update toast styles
Browse files Browse the repository at this point in the history
  • Loading branch information
marcmatias committed May 16, 2024
1 parent a7afed4 commit f1a177a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 14 deletions.
1 change: 1 addition & 0 deletions brasilio_auth/templates/brasilio_auth/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
placeholder="Usuário" aria-label="Usuário"
aria-describedby="Campo usuário"
required
autofocus
>
</div>
<div class="input-group input-group-lg mb-4">
Expand Down
16 changes: 16 additions & 0 deletions static_src/scss/layouts/_authbase.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,19 @@
.auth-btn {
@extend .w-100, .my-2, .btn, .btn-lg, .btn-primary;
}

.toast-primary {
@extend .bg-primary;
}

.toast-warning {
@extend .bg-warning;
}

.toast-danger {
@extend .bg-danger;
}

.toast-info {
@extend .bg-info;
}
22 changes: 8 additions & 14 deletions templates/includes/toast.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
<div
class="toast align-items-center text-white bg-{{type}} bg-gradient border-0 fw-bold p-1"
role="alert"
aria-live="assertive"
aria-atomic="true"
>
<div class="d-flex">
<div class="toast-body">{{ message }}</div>
<button
type="button"
class="btn-close btn-close-white me-2 m-auto"
data-bs-dismiss="toast"
aria-label="Close"
></button>
<div class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<div class="rounded me-2 p-2 bg-{{type}}"></div>
<strong class="me-auto">Brasil.io</strong>
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
<div class="toast-body">
{{ message }}
</div>
</div>

0 comments on commit f1a177a

Please sign in to comment.