Add notices
This commit is contained in:
@@ -16,6 +16,33 @@ html
|
||||
= t("nav.settings")
|
||||
= button_to t("nav.log_out"), session_path, method: :delete
|
||||
|
||||
css:
|
||||
.toast {
|
||||
opacity: 0;
|
||||
animation: fadeInAndOut 6s linear;
|
||||
}
|
||||
@keyframes fadeInAndOut {
|
||||
0%, 5%, 100% { opacity: 0 }
|
||||
7%, 85% { opacity: 1 }
|
||||
}
|
||||
javascript:
|
||||
function closeToast(event) {
|
||||
event.target.parentElement.parentElement.style.display = 'none';
|
||||
}
|
||||
|
||||
.toast-container.position-fixed.p-3 style="right: 30px; top: 100px"
|
||||
- flash.each do |type, msg|
|
||||
.toast role="alert" aria-live="assertive" aria-atomic="true" style="display: block"
|
||||
.toast-header
|
||||
strong.me-auto
|
||||
i.bi-bell-fill.fs-6.text-primary
|
||||
=< type.humanize
|
||||
small.text-body-secondary
|
||||
| Just now
|
||||
button.btn-close type="button" data-bs-dismiss="toast" aria-label="Close" onclick="closeToast(event)"
|
||||
.toast-body
|
||||
= msg
|
||||
|
||||
h1.mb-4
|
||||
= @title
|
||||
- if @action_path
|
||||
|
Reference in New Issue
Block a user