devlucem's picture
Add JS functionality to all buttons
f5f2bc2 verified
Raw History Blame Contribute Delete
2.15 kB
class CustomFooter extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
footer {
background: white;
color: #4b5563;
padding: 2rem;
text-align: center;
margin-top: auto;
border-top: 1px solid #e5e7eb;
}
.footer-content {
max-width: 1200px;
margin: 0 auto;
display: flex;
flex-direction: column;
align-items: center;
}
.footer-links {
display: flex;
gap: 1.5rem;
margin-bottom: 1.5rem;
}
.footer-link {
color: #4b5563;
text-decoration: none;
font-size: 0.875rem;
transition: color 0.2s;
}
.footer-link:hover {
color: #1e40af;
}
.footer-copyright {
font-size: 0.875rem;
color: #6b7280;
}
.social-links {
display: flex;
gap: 1rem;
margin-top: 1.5rem;
}
.social-link {
color: #6b7280;
transition: color 0.2s;
}
.social-link:hover {
color: #3b82f6;
}
</style>
<footer>
<div class="footer-content">
<div class="footer-links">
<a href="#" class="footer-link">About</a>
<a href="#" class="footer-link">Privacy</a>
<a href="#" class="footer-link">Terms</a>
<a href="#" class="footer-link">Contact</a>
</div>
<p class="footer-copyright">&copy; ${new Date().getFullYear()} CryptoFlow Analytics. All rights reserved.</p>
<div class="social-links">
<a href="#" class="social-link"><i data-feather="twitter"></i></a>
<a href="#" class="social-link"><i data-feather="github"></i></a>
<a href="#" class="social-link"><i data-feather="linkedin"></i></a>
</div>
</div>
</footer>
<script>
feather.replace();
</script>
`;
}
}
customElements.define('custom-footer', CustomFooter);