File size: 1,301 Bytes
58dd036
49343c4
58dd036
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49343c4
 
58dd036
 
49343c4
58dd036
49343c4
58dd036
 
 
 
 
 
 
 
49343c4
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

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();
        });
    }
});