Public Access
1
0

working site??

This commit is contained in:
2025-08-05 21:15:54 -04:00
parent 59f7db16fe
commit 56bde4626c
10 changed files with 376 additions and 20 deletions

31
src/js/main.js Normal file
View File

@@ -0,0 +1,31 @@
// Mobile menu toggle
const mobileMenuButton = document.getElementById('mobile-menu-button');
const mobileMenu = document.getElementById('mobile-menu');
if (mobileMenuButton && mobileMenu) {
mobileMenuButton.addEventListener('click', () => {
mobileMenu.classList.toggle('hidden');
});
}
// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="/#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
let targetId = this.getAttribute('href').substring(2);
let targetElement = document.getElementById(targetId);
if (targetElement) {
targetElement.scrollIntoView({
behavior: 'smooth'
});
}
// Close mobile menu on link click
if (mobileMenu && !mobileMenu.classList.contains('hidden')) {
mobileMenu.classList.add('hidden');
}
});
});