add image fade in

This commit is contained in:
isUnknown 2024-09-06 14:39:21 +02:00
parent f4e95f987d
commit 96bcd73a0e
3 changed files with 41 additions and 2 deletions

View file

@ -21,4 +21,18 @@ function closeNav(nodes) {
nodes.main.removeEventListener("click", handleClick);
}
export { expandNav, closeNav };
function show(image) {
image.classList.add("show");
let svg;
try {
if ((svg = image.nextElementSibling)) {
svg.classList.add("hide");
image.parentNode.classList.add("hide");
}
} catch (error) {
console.log(error);
console.log(image);
}
}
export { expandNav, closeNav, show };