save before redesign mobile nav
All checks were successful
Deploy / Deploy to Production (push) Successful in 3s
All checks were successful
Deploy / Deploy to Production (push) Successful in 3s
This commit is contained in:
parent
e349e642cb
commit
c8066906f2
9 changed files with 135 additions and 34 deletions
15
assets/js/mobile-menu-toggle.js
Normal file
15
assets/js/mobile-menu-toggle.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const mobileMenuToggle = document.querySelector("button#mobile-menu-toggle");
|
||||
const mobileMenuContent = document.querySelector("#mobile-menu-content");
|
||||
const mobileMenuBackdrop = document.querySelector(
|
||||
"#mobile-menu-content > .backdrop",
|
||||
);
|
||||
|
||||
mobileMenuToggle.addEventListener("click", () => {
|
||||
mobileMenuContent.classList.toggle("visible");
|
||||
});
|
||||
|
||||
mobileMenuBackdrop.addEventListener("click", () => {
|
||||
mobileMenuContent.classList.remove("visible");
|
||||
});
|
||||
});
|
||||
|
|
@ -4,7 +4,9 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
|
||||
nextButtons.forEach((nextButton) => {
|
||||
nextButton.addEventListener("click", () => {
|
||||
const activePicture = nextButton.closest(".project-slideshow").querySelector("picture.active");
|
||||
const activePicture = nextButton
|
||||
.closest(".project-slideshow")
|
||||
.querySelector("picture.active");
|
||||
const targetPicture =
|
||||
activePicture.nextElementSibling &&
|
||||
activePicture.nextElementSibling.tagName === "PICTURE"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue