Index > JS > add arrow key navigation + go to prev/next project after/before first/last picture
All checks were successful
Deploy / Deploy to Production (push) Successful in 5s

This commit is contained in:
Camilledenoray 2026-06-11 18:40:52 +02:00
parent 2563b27d26
commit 412c2a5547
2 changed files with 131 additions and 24 deletions

View file

@ -21,6 +21,10 @@ allProjects.forEach((currentProject) => {
}
});
currentProject
.querySelectorAll("picture")
.forEach((picture) => picture.classList.remove("active"));
currentProject.querySelector("picture:first-child").classList.add("active");
currentProject.classList.toggle("selected");
Router.setParam("project", currentProject.dataset.slug);