| class CustomFooter extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| footer { | |
| background: rgba(17, 24, 39, 0.9); | |
| backdrop-filter: blur(10px); | |
| color: #9ca3af; | |
| padding: 2rem; | |
| text-align: center; | |
| margin-top: auto; | |
| border-top: 1px solid #374151; | |
| } | |
| .footer-content { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| } | |
| .footer-links { | |
| display: flex; | |
| justify-content: center; | |
| gap: 2rem; | |
| margin-bottom: 1rem; | |
| } | |
| .footer-links a { | |
| color: #d1d5db; | |
| text-decoration: none; | |
| transition: color 0.2s; | |
| } | |
| .footer-links a:hover { | |
| color: white; | |
| } | |
| .copyright { | |
| font-size: 0.9rem; | |
| } | |
| @media (max-width: 768px) { | |
| .footer-links { | |
| flex-direction: column; | |
| gap: 1rem; | |
| } | |
| } | |
| </style> | |
| <footer> | |
| <div class="footer-content"> | |
| <div class="footer-links"> | |
| <a href="/"><i data-feather="home" class="mr-2"></i> Home</a> | |
| <a href="/about.html"><i data-feather="info" class="mr-2"></i> About</a> | |
| <a href="#"><i data-feather="shield" class="mr-2"></i> Privacy</a> | |
| <a href="#"><i data-feather="file-text" class="mr-2"></i> Terms</a> | |
| </div> | |
| <div class="copyright"> | |
| © 2023 ChatGPT Clone. This is a demo application. All rights reserved. | |
| </div> | |
| </div> | |
| </footer> | |
| `; | |
| // Initialize feather icons after content is added | |
| setTimeout(() => { | |
| if (typeof feather !== 'undefined') { | |
| feather.replace(); | |
| } | |
| }, 0); | |
| } | |
| } | |
| customElements.define('custom-footer', CustomFooter); |