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
All checks were successful
Deploy / Deploy to Production (push) Successful in 5s
This commit is contained in:
parent
2563b27d26
commit
412c2a5547
2 changed files with 131 additions and 24 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue