Spaces:
Running
Running
| class CustomFooter extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| :host { | |
| display: block; | |
| background-color: #1F2937; | |
| color: white; | |
| padding: 3rem 1rem; | |
| } | |
| .footer-container { | |
| max-width: 1280px; | |
| margin: 0 auto; | |
| display: grid; | |
| grid-template-columns: repeat(1, minmax(0, 1fr)); | |
| gap: 2rem; | |
| } | |
| .footer-logo { | |
| font-size: 1.5rem; | |
| font-weight: 700; | |
| color: white; | |
| display: flex; | |
| align-items: center; | |
| margin-bottom: 1rem; | |
| } | |
| .footer-logo i { | |
| margin-right: 0.5rem; | |
| } | |
| .footer-description { | |
| color: #9CA3AF; | |
| margin-bottom: 1.5rem; | |
| max-width: 300px; | |
| } | |
| .footer-social { | |
| display: flex; | |
| gap: 1rem; | |
| } | |
| .footer-social a { | |
| color: #9CA3AF; | |
| transition: color 0.2s; | |
| } | |
| .footer-social a:hover { | |
| color: white; | |
| } | |
| .footer-links h3 { | |
| font-weight: 600; | |
| margin-bottom: 1rem; | |
| color: white; | |
| } | |
| .footer-links ul { | |
| list-style: none; | |
| padding: 0; | |
| } | |
| .footer-links li { | |
| margin-bottom: 0.5rem; | |
| } | |
| .footer-links a { | |
| color: #9CA3AF; | |
| text-decoration: none; | |
| transition: color 0.2s; | |
| } | |
| .footer-links a:hover { | |
| color: white; | |
| } | |
| .footer-bottom { | |
| border-top: 1px solid #374151; | |
| padding-top: 1.5rem; | |
| margin-top: 2rem; | |
| text-align: center; | |
| color: #9CA3AF; | |
| } | |
| @media (min-width: 768px) { | |
| .footer-container { | |
| grid-template-columns: repeat(4, minmax(0, 1fr)); | |
| } | |
| } | |
| </style> | |
| <div class="footer-container"> | |
| <div class="footer-about"> | |
| <div class="footer-logo"> | |
| <i data-feather="book-open"></i> | |
| BookWorm | |
| </div> | |
| <p class="footer-description"> | |
| Your digital library with thousands of free eBooks to download and read. | |
| </p> | |
| <div class="footer-social"> | |
| <a href="#"><i data-feather="facebook"></i></a> | |
| <a href="#"><i data-feather="twitter"></i></a> | |
| <a href="#"><i data-feather="instagram"></i></a> | |
| <a href="#"><i data-feather="youtube"></i></a> | |
| </div> | |
| </div> | |
| <div class="footer-links"> | |
| <h3>Categories</h3> | |
| <ul> | |
| <li><a href="#">Fiction</a></li> | |
| <li><a href="#">Non-Fiction</a></li> | |
| <li><a href="#">Science</a></li> | |
| <li><a href="#">History</a></li> | |
| <li><a href="#">Romance</a></li> | |
| </ul> | |
| </div> | |
| <div class="footer-links"> | |
| <h3>Quick Links</h3> | |
| <ul> | |
| <li><a href="#">Home</a></li> | |
| <li><a href="#">About Us</a></li> | |
| <li><a href="#">Contact</a></li> | |
| <li><a href="#">FAQ</a></li> | |
| <li><a href="#">Privacy Policy</a></li> | |
| </ul> | |
| </div> | |
| <div class="footer-links"> | |
| <h3>Contact</h3> | |
| <ul> | |
| <li><i data-feather="mail" class="inline mr-2"></i> hello@bookworm.com</li> | |
| <li><i data-feather="phone" class="inline mr-2"></i> +1 (555) 123-4567</li> | |
| <li><i data-feather="map-pin" class="inline mr-2"></i> 123 Book St, Library City</li> | |
| </ul> | |
| </div> | |
| </div> | |
| <div class="footer-bottom"> | |
| <p>© ${new Date().getFullYear()} BookWorm Haven. All rights reserved.</p> | |
| </div> | |
| `; | |
| } | |
| } | |
| customElements.define('custom-footer', CustomFooter); |