class CustomHeader extends HTMLElement { constructor() { super(); } connectedCallback() { this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = `
Home Gallery Create About Contact
`; // Add event listener for mobile menu this.shadowRoot.getElementById('mobileMenuBtn').addEventListener('click', () => { const menu = this.shadowRoot.getElementById('mobileMenu'); menu.classList.toggle('active'); }); // Replace feather icons after component is attached if (window.feather) { window.feather.replace(); } else { window.addEventListener('feather-icons-loaded', () => { window.feather.replace(); }); } } } customElements.define('custom-header', CustomHeader);