BlackMonsterMedia's picture
update the website
7b1f00d verified
document.addEventListener('DOMContentLoaded', function() {
feather.replace();
// Scroll suave para links âncora
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
// Animate elements when they come into view
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);
});
// Service button hover effects
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');
});
});
// New functionality for enhanced user experience
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)';
});
});