1const menuAnimations = { 2 show: "slide-in-right", 3 hide: "slide-out-right", 4 }; 5 6 const menu = document.querySelector(".menu"); 7 const openMenuBtn = document.querySelector(".open-menu-btn"); 8 const closeMenuBtn = document.querySelector(".close-menu-btn"); 9 10 [openMenuBtn, closeMenuBtn].forEach((btn) => { 11 btn.addEventListener("click", () => { 12 menu.classList.toggle("open"); 13 14 if (!menu.classList.contains(menuAnimations.show)) { 15 menu.classList.add(menuAnimations.show); 16 menu.classList.remove(menuAnimations.hide); 17 } else { 18 menu.classList.add(menuAnimations.hide); 19 menu.classList.remove(menuAnimations.show); 20 } 21 window.addEventListener("resize", () => { 22 if (window.innerWidth >= 1200) { 23 if (menu.classList.contains(menuAnimations.hide)) { 24 menu.classList.remove(menuAnimations.hide); 25 } 26 } 27 }); 28 menu.style.transition = "transform 05.s ease"; 29 }); 30 }); 31 32 menu.addEventListener("transitionend", (e) => { 33 e.target.removeAttribute("style"); 34 }); 35 36 menu.querySelectorAll(".dropdown > i").forEach((arrow) => { 37 arrow.addEventListener("click", (e) => { 38 e.target.closest(".dropdown").classList.toggle("active"); 39 }); 40 }); 41
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.