|
|
|
|
|
document.addEventListener('DOMContentLoaded', function() { |
|
|
feather.replace(); |
|
|
|
|
|
document.querySelectorAll('a[href^="#"]').forEach(anchor => { |
|
|
anchor.addEventListener('click', function (e) { |
|
|
e.preventDefault(); |
|
|
document.querySelector(this.getAttribute('href')).scrollIntoView({ |
|
|
behavior: 'smooth' |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
|
|
|
const observer = new IntersectionObserver((entries) => { |
|
|
entries.forEach(entry => { |
|
|
if (entry.isIntersecting) { |
|
|
entry.target.classList.add('animate-fade-in'); |
|
|
observer.unobserve(entry.target); |
|
|
} |
|
|
}); |
|
|
}, { threshold: 0.1 }); |
|
|
|
|
|
document.querySelectorAll('.animate-on-scroll').forEach(el => { |
|
|
observer.observe(el); |
|
|
}); |
|
|
|
|
|
document.querySelectorAll('.service-btn').forEach(btn => { |
|
|
btn.addEventListener('mouseenter', () => { |
|
|
btn.querySelector('div').classList.add('hover:animate-bounce'); |
|
|
}); |
|
|
btn.addEventListener('mouseleave', () => { |
|
|
btn.querySelector('div').classList.remove('hover:animate-bounce'); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
document.querySelectorAll('.dashboard-card').forEach(card => { |
|
|
card.addEventListener('mouseenter', () => { |
|
|
card.style.transform = 'translateY(-8px)'; |
|
|
card.style.boxShadow = '0 20px 25px -5px rgba(0, 0, 0, 0.1)'; |
|
|
}); |
|
|
card.addEventListener('mouseleave', () => { |
|
|
card.style.transform = 'translateY(0)'; |
|
|
card.style.boxShadow = '0 1px 3px 0 rgba(0, 0, 0, 0.1)'; |
|
|
}); |
|
|
}); |
|
|
|