blake4john3000's picture
can you add a blog page
2edf356 verified
Raw History Blame Contribute Delete
642 Bytes
// Shared JavaScript functions
document.addEventListener('DOMContentLoaded', () => {
// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
// Mobile menu toggle (will be used in navbar component)
window.toggleMobileMenu = () => {
const menu = document.getElementById('mobile-menu');
menu.classList.toggle('hidden');
};
});