Merge pull request #70 from sapradhan/main

toggle active on correct element
This commit is contained in:
Somrat 2023-12-31 08:16:47 +06:00 committed by GitHub
commit f2f9095d1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@
dropdownMenuToggler.forEach((toggler) => {
toggler?.addEventListener("click", (e) => {
e.target.parentElement.classList.toggle("active");
e.target.closest('.nav-item').classList.toggle("active");
});
});

View File

@ -36,7 +36,7 @@ input#nav-toggle:checked ~ #nav-menu {
// }
.nav-link {
@apply text-dark hover:text-primary dark:text-darkmode-dark dark:hover:text-darkmode-primary block p-3 font-semibold transition lg:px-2 lg:py-3;
@apply text-dark hover:text-primary dark:text-darkmode-dark dark:hover:text-darkmode-primary block p-3 cursor-pointer font-semibold transition lg:px-2 lg:py-3;
}
.nav-dropdown {