| class CustomFooter extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| :host { | |
| display: block; | |
| width: 100%; | |
| background-color: #1e1b4b; | |
| color: white; | |
| padding: 3rem 0; | |
| } | |
| .footer-content { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: 0 2rem; | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); | |
| gap: 2rem; | |
| } | |
| .footer-section h3 { | |
| font-size: 1.25rem; | |
| font-weight: 600; | |
| margin-bottom: 1.5rem; | |
| color: #a5b4fc; | |
| } | |
| .footer-section p { | |
| margin-bottom: 1rem; | |
| color: #e0e7ff; | |
| line-height: 1.6; | |
| } | |
| .social-links { | |
| display: flex; | |
| gap: 1rem; | |
| margin-top: 1.5rem; | |
| } | |
| .social-links a { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| width: 40px; | |
| height: 40px; | |
| border-radius: 50%; | |
| background-color: #4f46e5; | |
| color: white; | |
| transition: background-color 0.3s; | |
| } | |
| .social-links a:hover { | |
| background-color: #6366f1; | |
| } | |
| .footer-bottom { | |
| text-align: center; | |
| padding-top: 2rem; | |
| margin-top: 2rem; | |
| border-top: 1px solid #4f46e5; | |
| color: #a5b4fc; | |
| font-size: 0.875rem; | |
| } | |
| @media (max-width: 768px) { | |
| .footer-content { | |
| grid-template-columns: 1fr; | |
| } | |
| } | |
| </style> | |
| <div class="footer-content"> | |
| <div class="footer-section"> | |
| <h3>About Me</h3> | |
| <p>I'm a passionate [Your Profession] dedicated to creating beautiful and functional digital experiences that make a difference.</p> | |
| </div> | |
| <div class="footer-section"> | |
| <h3>Quick Links</h3> | |
| <p><a href="#about" style="color: #a5b4fc; text-decoration: none;">About</a></p> | |
| <p><a href="#work" style="color: #a5b4fc; text-decoration: none;">Work</a></p> | |
| <p><a href="#contact" style="color: #a5b4fc; text-decoration: none;">Contact</a></p> | |
| </div> | |
| <div class="footer-section"> | |
| <h3>Connect</h3> | |
| <div class="social-links"> | |
| <a href="#"><i data-feather="twitter"></i></a> | |
| <a href="#"><i data-feather="linkedin"></i></a> | |
| <a href="#"><i data-feather="github"></i></a> | |
| <a href="#"><i data-feather="instagram"></i></a> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="footer-bottom"> | |
| <p>© ${new Date().getFullYear()} [Your Name]. All rights reserved.</p> | |
| </div> | |
| `; | |
| } | |
| } | |
| customElements.define('custom-footer', CustomFooter); |