| class CustomFooter extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| footer { | |
| background: #1e293b; | |
| color: #f8fafc; | |
| padding: 1.5rem; | |
| text-align: center; | |
| margin-top: auto; | |
| font-size: 0.875rem; | |
| } | |
| .footer-content { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 0.5rem; | |
| } | |
| .footer-links { | |
| display: flex; | |
| justify-content: center; | |
| gap: 1rem; | |
| margin-top: 0.5rem; | |
| } | |
| .footer-links a { | |
| color: #cbd5e1; | |
| text-decoration: none; | |
| transition: color 0.2s; | |
| } | |
| .footer-links a:hover { | |
| color: white; | |
| } | |
| </style> | |
| <footer> | |
| <div class="footer-content"> | |
| <p>© ${new Date().getFullYear()} Avatar API Fetcher. All rights reserved.</p> | |
| <div class="footer-links"> | |
| <a href="/privacy">Privacy</a> | |
| <a href="/terms">Terms</a> | |
| <a href="mailto:contact@avatarfetcher.com">Contact</a> | |
| </div> | |
| </div> | |
| </footer> | |
| `; | |
| } | |
| } | |
| customElements.define('custom-footer', CustomFooter); |