class DocFooter extends HTMLElement { connectedCallback() { this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = ` `; // Add newsletter form functionality setTimeout(() => { const form = this.shadowRoot.querySelector('.newsletter-form'); const button = form.querySelector('button'); form.addEventListener('submit', (e) => { e.preventDefault(); const input = form.querySelector('input[type="email"]'); if (input.value) { button.innerHTML = '✓ Subscribed!'; button.style.background = 'linear-gradient(to right, #10b981, #059669)'; input.value = ''; setTimeout(() => { button.innerHTML = 'Subscribe'; button.style.background = 'linear-gradient(to right, #06b6d4, #8b5cf6)'; }, 3000); } }); // Replace feather icons if (typeof feather !== 'undefined') { feather.replace({ 'stroke-width': 2, 'height': 20, 'width': 20 }); } }, 100); } } customElements.define('doc-footer', DocFooter);