This commit is contained in:
2023-01-18 15:21:38 +00:00
commit 5b47244ee9
29 changed files with 15604 additions and 0 deletions

16
public/js/inc.js Normal file
View File

@@ -0,0 +1,16 @@
document.addEventListener("click", e => {
const isDropdownButton = e.target.matches("[data-dropdown-button]")
if (!isDropdownButton && e.target.closest("[data-dropdown]") != null) return
let currentDropdown
if (isDropdownButton) {
currentDropdown = e.target.closest("[data-dropdown]")
currentDropdown.classList.toggle("active")
}
document.querySelectorAll("[data-dropdown].active").forEach(dropdown => {
if (dropdown === currentDropdown) return
dropdown.classList.remove("active")
})
})