w4rriorG's picture
make multiple pages for everyhting and make it for a online service provideinhg company of video editing and coding and make evry page seprate and navbar to switch btw pages
58dd036 verified
Raw
History Blame Contribute Delete
1.3 kB
document.addEventListener('DOMContentLoaded', function() {
// Initialize Feather Icons
if (window.feather) {
feather.replace();
}
// Initialize mobile menu for custom navbar
const initCustomNavbar = () => {
const navbar = document.querySelector('custom-navbar');
if (navbar) {
const shadowRoot = navbar.shadowRoot;
const mobileMenuButton = shadowRoot.getElementById('mobile-menu-button');
const mobileMenu = shadowRoot.getElementById('mobile-menu');
if (mobileMenuButton && mobileMenu) {
mobileMenuButton.addEventListener('click', () => {
mobileMenu.classList.toggle('hidden');
if (window.feather) {
feather.replace();
}
});
}
}
};
initCustomNavbar();
// Form handling for contact page
const contactForm = document.querySelector('form');
if (contactForm) {
contactForm.addEventListener('submit', function(e) {
e.preventDefault();
// Here you would typically send the form data to a server
alert('Thank you for your message! We will get back to you soon.');
this.reset();
});
}
});