Middleware+View+UserState: Add toast messages
This commit is contained in:
@@ -1,3 +1,17 @@
|
||||
/* -------------------------------------- */
|
||||
/* Toast */
|
||||
|
||||
.toast-container {
|
||||
position: fixed;
|
||||
bottom: 30px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
/* -------------------------------------- */
|
||||
/* Table */
|
||||
|
||||
tr.htmx-swapping td {
|
||||
opacity: 0;
|
||||
transition: opacity 0.5s ease-out;
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
// Activate Bootstrap tooltips
|
||||
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
|
||||
const tooltipList = [...tooltipTriggerList].map(element => new bootstrap.Tooltip(element))
|
||||
|
||||
// -----------------------------------------
|
||||
// HTMX events
|
||||
|
||||
function runOnceAfterSettle(func) {
|
||||
// https://htmx.org/docs/#request-operations
|
||||
document.addEventListener("htmx:afterSettle", function handler(event) {
|
||||
func();
|
||||
document.removeEventListener("htmx:afterSwap", handler);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user