creative888's picture
https://replit.com/~
42ab03e verified
class CustomFooter extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
:host {
display: block;
margin-top: 4rem;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.footer {
background-color: #1F2937;
color: #d1d5db;
padding: 3rem 1rem 2rem;
}
.container {
max-width: 1280px;
margin: 0 auto;
}
.footer-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 2rem;
margin-bottom: 3rem;
}
.footer-logo {
color: white;
font-size: 1.5rem;
font-weight: 700;
margin-bottom: 1rem;
display: flex;
align-items: center;
gap: 0.75rem;
}
.footer-description {
color: #9ca3af;
font-size: 0.875rem;
line-height: 1.5;
margin-bottom: 1.5rem;
}
.social-links {
display: flex;
gap: 1rem;
}
.social-link {
color: #9ca3af;
transition: color 0.2s;
}
.social-link:hover {
color: white;
}
.footer-heading {
color: white;
font-weight: 600;
margin-bottom: 1.5rem;
font-size: 1rem;
}
.footer-links {
list-style: none;
}
.footer-link {
margin-bottom: 0.75rem;
}
.footer-link a {
color: #9ca3af;
text-decoration: none;
font-size: 0.875rem;
transition: color 0.2s;
}
.footer-link a:hover {
color: white;
}
.copyright {
border-top: 1px solid #374151;
padding-top: 2rem;
text-align: center;
color: #9ca3af;
font-size: 0.875rem;
}
@media (max-width: 768px) {
.footer-grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 480px) {
.footer-grid {
grid-template-columns: 1fr;
}
}
</style>
<footer class="footer">
<div class="container">
<div class="footer-grid">
<div>
<div class="footer-logo">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2L2 7L12 12L22 7L12 2Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M2 17L12 22L22 17" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M2 12L12 17L22 12" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
Replit
</div>
<p class="footer-description">
Build, collaborate, and ship software faster with our cloud-based IDE.
</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="youtube"></i>
</a>
<a href="#" class="social-link">
<i data-feather="linkedin"></i>
</a>
</div>
</div>
<div>
<h3 class="footer-heading">Product</h3>
<ul class="footer-links">
<li class="footer-link"><a href="#">Features</a></li>
<li class="footer-link"><a href="#">Templates</a></li>
<li class="footer-link"><a href="#">Languages</a></li>
<li class="footer-link"><a href="#">Mobile App</a></li>
<li class="footer-link"><a href="#">Pricing</a></li>
</ul>
</div>
<div>
<h3 class="footer-heading">Resources</h3>
<ul class="footer-links">
<li class="footer-link"><a href="#">Documentation</a></li>
<li class="footer-link"><a href="#">Tutorials</a></li>
<li class="footer-link"><a href="#">Blog</a></li>
<li class="footer-link"><a href="#">Community</a></li>
<li class="footer-link"><a href="#">Support</a></li>
</ul>
</div>
<div>
<h3 class="footer-heading">Company</h3>
<ul class="footer-links">
<li class="footer-link"><a href="#">About</a></li>
<li class="footer-link"><a href="#">Careers</a></li>
<li class="footer-link"><a href="#">Terms of Service</a></li>
<li class="footer-link"><a href="#">Privacy Policy</a></li>
<li class="footer-link"><a href="#">Contact</a></li>
</ul>
</div>
</div>
<div class="copyright">
&copy; ${new Date().getFullYear()} Replit Clone. All rights reserved.
</div>
</div>
</footer>
`;
// Initialize feather icons in shadow DOM
import('https://unpkg.com/feather-icons').then(() => {
feather.replace();
});
}
}
customElements.define('custom-footer', CustomFooter);