jet-2007's picture
Build a Cross‑Platform Time Clock App (Multi‑Company, Employees, Geotagging, Reports)
59f8f47 verified
class CustomFooter extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
footer {
background-color: var(--secondary-700);
color: white;
padding: 3rem 0;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 1rem;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 2rem;
}
.footer-logo {
font-size: 1.5rem;
font-weight: 700;
margin-bottom: 1rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.footer-description {
color: var(--secondary-200);
margin-bottom: 1.5rem;
}
.social-links {
display: flex;
gap: 1rem;
}
.social-link {
color: white;
width: 36px;
height: 36px;
border-radius: 50%;
background-color: rgba(255,255,255,0.1);
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.2s;
}
.social-link:hover {
background-color: var(--primary-500);
}
.footer-heading {
font-weight: 600;
margin-bottom: 1.25rem;
font-size: 1.125rem;
}
.footer-links {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.footer-link {
color: var(--secondary-200);
text-decoration: none;
transition: color 0.2s;
}
.footer-link:hover {
color: white;
}
.copyright {
margin-top: 3rem;
padding-top: 1.5rem;
border-top: 1px solid rgba(255,255,255,0.1);
text-align: center;
color: var(--secondary-300);
}
@media (max-width: 768px) {
.container {
grid-template-columns: 1fr 1fr;
}
}
</style>
<footer>
<div class="container">
<div class="footer-col">
<div class="footer-logo">
<i data-feather="clock"></i>
TimeKeeper Pro
</div>
<p class="footer-description">
Modern time tracking solution for businesses of all sizes with geotagging and reporting.
</p>
<div class="social-links">
<a href="#" class="social-link"><i data-feather="twitter"></i></a>
<a href="#" class="social-link"><i data-feather="facebook"></i></a>
<a href="#" class="social-link"><i data-feather="linkedin"></i></a>
<a href="#" class="social-link"><i data-feather="github"></i></a>
</div>
</div>
<div class="footer-col">
<h4 class="footer-heading">Product</h4>
<div class="footer-links">
<a href="/features" class="footer-link">Features</a>
<a href="/pricing" class="footer-link">Pricing</a>
<a href="/solutions" class="footer-link">Solutions</a>
<a href="/updates" class="footer-link">Updates</a>
</div>
</div>
<div class="footer-col">
<h4 class="footer-heading">Resources</h4>
<div class="footer-links">
<a href="/blog" class="footer-link">Blog</a>
<a href="/guides" class="footer-link">Guides</a>
<a href="/support" class="footer-link">Support</a>
<a href="/api" class="footer-link">API</a>
</div>
</div>
<div class="footer-col">
<h4 class="footer-heading">Company</h4>
<div class="footer-links">
<a href="/about" class="footer-link">About Us</a>
<a href="/careers" class="footer-link">Careers</a>
<a href="/contact" class="footer-link">Contact</a>
<a href="/legal" class="footer-link">Legal</a>
</div>
</div>
</div>
<div class="container">
<div class="copyright">
© ${new Date().getFullYear()} TimeKeeper Pro. All rights reserved.
</div>
</div>
</footer>
`;
// Replace Feather icons
setTimeout(() => {
if (window.feather) {
window.feather.replace({ class: 'feather-inline' });
}
}, 100);
}
}
customElements.define('custom-footer', CustomFooter);