mirror of
https://github.com/tabler/tabler.git
synced 2026-07-25 20:44:38 +04:00
[dev-toasts-initialization] initialize toasts on app start
This commit is contained in:
@@ -44,4 +44,9 @@ import './dropdown';
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let toastsTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="toast"]'));
|
||||||
|
toastsTriggerList.map(function (toastTriggerEl) {
|
||||||
|
return new bootstrap.Toast(toastTriggerEl);
|
||||||
|
});
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% assign person-id = include.person-id | default: 2 %}
|
{% assign person-id = include.person-id | default: 2 %}
|
||||||
{% assign person = site.data.people[person-id] %}
|
{% assign person = site.data.people[person-id] %}
|
||||||
<div class="toast show" role="alert" aria-live="assertive" aria-atomic="true" data-autohide="false" data-bs-toggle="toast">
|
<div class="toast show" role="alert" aria-live="assertive" aria-atomic="true" data-bs-autohide="false" data-bs-toggle="toast">
|
||||||
{% unless include.hide-header %}
|
{% unless include.hide-header %}
|
||||||
<div class="toast-header">
|
<div class="toast-header">
|
||||||
{% include ui/avatar.html person=person class="me-2" size="xs" %}
|
{% include ui/avatar.html person=person class="me-2" size="xs" %}
|
||||||
|
|||||||
Reference in New Issue
Block a user