Repository navigation
Expand file tree
/
Copy pathscript.js
More file actions
90 lines (84 loc) · 1.66 KB
/
Copy pathscript.js
File metadata and controls
90 lines (84 loc) · 1.66 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// 🌌 tsParticles Setup
tsParticles.load("tsparticles", {
particles: {
number: {
value: 50,
density: {
enable: true,
value_area: 1000
}
},
shape: {
type: "star",
},
size: {
value: 4,
random: true
},
move: {
enable: true,
speed: 4,
direction: "none",
random: true,
outModes: {
default: "out"
}
},
links: {
enable: true,
distance: 170,
color: "#d1ff33", // Corrected the color format
width: 1
}
},
interactivity: {
events: {
onHover: {
enable: false,
mode: "repulse"
},
onClick: {
enable: false,
mode: "push"
}
}
}
});
// ⚡ GSAP Animations
gsap.from(".logo", {
duration: 1,
y: -50,
opacity: 0,
ease: "bounce"
});
gsap.from(".nav ul li", {
duration: 1,
x: -30,
opacity: 0,
stagger: 0.2,
delay: 0.5
});
gsap.from(".hero h2", {
duration: 1,
y: 30,
opacity: 0,
delay: 1
});
gsap.from(".hero p", {
duration: 1,
y: 30,
opacity: 0,
delay: 1.2
});
gsap.from(".btn-primary", {
duration: 1,
y: 30,
opacity: 0,
delay: 1.4
});
// Toggle the navigation menu when the hamburger is clicked
const hamburger = document.getElementById('hamburger');
const navLinks = document.querySelector('nav ul');
hamburger.addEventListener('click', () => {
navLinks.classList.toggle('show');
});