-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
75 lines (66 loc) · 1.36 KB
/
app.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
const menu = document.querySelector('#mobile-menu');
const menuLinks = document.querySelector('.navbar__menu');
const navLogo = document.querySelector('#navbar__logo');
const body = document.querySelector('body');
// Display Mobile Menu
const mobileMenu = () => {
menu.classList.toggle('is-active');
menuLinks.classList.toggle('active');
body.classList.toggle('active');
};
menu.addEventListener('click', mobileMenu);
// Animations
gsap.from('.animate-hero', {
duration: 0.6,
opacity: 0,
y: -150,
stagger: 0.3,
});
gsap.from('.animate-hero', {
scrollTrigger: {
trigger: '.section-second',
pin: true,
start: 'top top',
end: '+=500',
scrub: 1,
once: true,
},
});
gsap.from('.animate-img', {
scrollTrigger: '.animate-services',
duration: 1.2,
opacity: 0,
x: -200,
});
gsap.from('.animate-membership', {
scrollTrigger: '.animate-membership',
duration: 1,
opacity: 0,
y: -150,
stagger: 0.3,
delay: 0.5,
});
gsap.from('.animate-card', {
scrollTrigger: '.animate-card',
duration: 1,
opacity: 0,
y: -150,
stagger: 0.1,
delay: 0.2,
});
gsap.from('.animate-team', {
scrollTrigger: '.animate-team',
duration: 1,
opacity: 0,
y: -150,
stagger: 0.3,
delay: 0.2,
});
gsap.from('.animate-email', {
scrollTrigger: '.animate-email',
duration: 0.8,
opacity: 0,
y: -150,
stagger: 0.25,
delay: 0.6,
});