File size: 2,435 Bytes
499a14d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | class CustomFooter extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
footer {
background: rgba(17, 24, 39, 0.8);
border-top: 1px solid rgba(55, 65, 81, 0.5);
margin-top: auto;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 1rem;
}
.footer-content {
display: flex;
justify-content: space-between;
align-items: center;
padding: 2rem 0;
}
.footer-links {
display: flex;
gap: 2rem;
}
.footer-link {
color: #9ca3af;
text-decoration: none;
font-size: 0.875rem;
transition: color 0.2s;
}
.footer-link:hover {
color: white;
}
.copyright {
color: #6b7280;
font-size: 0.875rem;
}
@media (max-width: 768px) {
.footer-content {
flex-direction: column;
gap: 1rem;
text-align: center;
}
.footer-links {
gap: 1rem;
}
}
</style>
<footer>
<div class="container">
<div class="footer-content">
<div class="copyright">
© 2024 ComponentForge AI. Built with 💜 and React.
</div>
<div class="footer-links">
<a href="#" class="footer-link">Privacy</a>
<a href="#" class="footer-link">Terms</a>
<a href="#" class="footer-link">GitHub</a>
<a href="#" class="footer-link">Contact</a>
</div>
</div>
</div>
</footer>
`;
}
}
customElements.define('custom-footer', CustomFooter); |