Omid7's picture
add footer navigation bar with icon
08e1c9a verified
class CustomFooter extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
footer {
background: #1a202c;
color: white;
padding: 1.5rem 2rem;
text-align: center;
margin-top: 2rem;
}
.container {
max-width: 1200px;
margin: 0 auto;
display: flex;
flex-direction: column;
align-items: center;
}
.links {
display: flex;
gap: 1rem;
margin-bottom: 1rem;
justify-content: center;
width: 100%;
}
a {
color: #a0aec0;
text-decoration: none;
transition: all 0.2s;
font-size: 0.75rem;
width: 60px;
text-align: center;
}
a:hover {
color: white;
transform: translateY(-2px);
}
a i {
transition: all 0.2s;
}
a:hover i {
transform: scale(1.1);
}
a:hover {
color: white;
}
.copyright {
color: #718096;
font-size: 0.875rem;
}
.version {
color: #4a5568;
font-size: 0.75rem;
margin-top: 0.5rem;
}
</style>
<footer>
<div class="container">
<div class="links">
<a href="/about" class="flex flex-col items-center">
<i data-feather="info" class="w-5 h-5 mb-1"></i>
<span>About</span>
</a>
<a href="/docs" class="flex flex-col items-center">
<i data-feather="book" class="w-5 h-5 mb-1"></i>
<span>Docs</span>
</a>
<a href="/privacy" class="flex flex-col items-center">
<i data-feather="shield" class="w-5 h-5 mb-1"></i>
<span>Privacy</span>
</a>
<a href="/contact" class="flex flex-col items-center">
<i data-feather="mail" class="w-5 h-5 mb-1"></i>
<span>Contact</span>
</a>
</div>
<p class="copyright">&copy; ${new Date().getFullYear()} ESP32 Command Center. All rights reserved.</p>
<p class="version">Firmware v2.1.4 | Dashboard v1.0.0</p>
</div>
</footer>
`;
}
}
customElements.define('custom-footer', CustomFooter);