-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
31 lines (28 loc) · 854 Bytes
/
script.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
// Initialize Lucide icons
lucide.createIcons({
attrs: {
'stroke-width': 1.5
}
});
// Smooth scroll functionality
document.querySelector('.scroll-button').addEventListener('click', () => {
document.getElementById('about').scrollIntoView({ behavior: 'smooth' });
});
// Optional: Add animation on scroll
const cards = document.querySelectorAll('.mission-card, .fight-item');
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.style.opacity = '1';
entry.target.style.transform = 'translateY(0)';
}
});
}, {
threshold: 0.1
});
cards.forEach(card => {
card.style.opacity = '0';
card.style.transform = 'translateY(20px)';
card.style.transition = 'all 0.6s ease-out';
observer.observe(card);
});