-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
44 lines (36 loc) · 1020 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const menuBtn=document.getElementById("menu_btn")
const navLinks=document.getElementById("nav_links")
const menuBtnIcon=menuBtn.querySelector("i")
menuBtn.addEventListener("click",(e)=>{
navLinks.classList.toggle("open")
const isOpen=navLinks.classList.contains("open")
menuBtnIcon.setAttribute("class",isOpen?"ri-close-line":"ri-menu-line")
})
navLinks.addEventListener("click",(e)=>{
navLinks.classList.remove("open")
menuBtnIcon.setAttribute("class","ri-menu-line")
})
const scrollRevealOption={
distance:"50px",
origin:"bottom",
duration:1000,
};
ScrollReveal().reveal(".header_image img", {
...scrollRevealOption,
origin: "right",
});
ScrollReveal().reveal(".header_content h2",{
...scrollRevealOption,
delay:500,
});
ScrollReveal().reveal(".header_content h1",{
...scrollRevealOption,
delay:1000,
});
ScrollReveal.reveal(".order_card",{
...scrollRevealOption,
interval:500,
});
ScrollReveal().reveal(".event_content",{
duration:1000,
});