chichimedia's picture
Instead of drawing make it a 3D interactive canvas with a cube as the object
76f1992 verified
class CustomFooter extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
:host {
display: block;
margin-top: 4rem;
border-top: 1px solid rgba(55, 65, 81, 0.5);
background: rgba(17, 24, 39, 0.8);
}
.footer {
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
}
.footer-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 1.5rem;
text-align: center;
}
.footer-logo {
display: flex;
align-items: center;
gap: 0.75rem;
font-weight: 700;
font-size: 1.25rem;
color: white;
}
.footer-links {
display: flex;
gap: 2rem;
flex-wrap: wrap;
justify-content: center;
}
.footer-link {
color: #9ca3af;
text-decoration: none;
transition: color 0.2s;
display: flex;
align-items: center;
gap: 0.5rem;
}
.footer-link:hover {
color: #ef4444;
}
.footer-copyright {
color: #6b7280;
font-size: 0.875rem;
margin-top: 1rem;
}
.tech-stack {
display: flex;
gap: 1rem;
align-items: center;
justify-content: center;
flex-wrap: wrap;
}
.tech-item {
background: rgba(55, 65, 81, 0.5);
padding: 0.5rem 1rem;
border-radius: 0.5rem;
font-size: 0.875rem;
color: #d1d5db;
display: flex;
align-items: center;
gap: 0.5rem;
}
@media (max-width: 768px) {
.footer {
padding: 1.5rem;
}
.footer-links {
flex-direction: column;
gap: 1rem;
}
.tech-stack {
flex-direction: column;
}
}
</style>
<footer class="footer">
<div class="footer-content">
<div class="footer-logo">
<i data-feather="cube"></i>
<span>CubePlay 3D</span>
</div>
<div class="tech-stack">
<span class="tech-item">
<i data-feather="zap"></i>
Three.js
</span>
<span class="tech-item">
<i data-feather="cpu"></i>
WebGL
</span>
<span class="tech-item">
<i data-feather="code"></i>
JavaScript
</span>
<span class="tech-item">
<i data-feather="layers"></i>
TailwindCSS
</span>
</div>
<div class="footer-links">
<a href="#" class="footer-link">
<i data-feather="info"></i>
About
</a>
<a href="#" class="footer-link">
<i data-feather="file-text"></i>
Documentation
</a>
<a href="#" class="footer-link">
<i data-feather="shield"></i>
Privacy
</a>
<a href="#" class="footer-link">
<i data-feather="mail"></i>
Contact
</a>
<a href="https://threejs.org" target="_blank" class="footer-link">
<i data-feather="external-link"></i>
Three.js
</a>
</div>
<div class="footer-copyright">
<p>© ${new Date().getFullYear()} CubePlay - Interactive 3D Experience. Built with passion for 3D graphics.</p>
<p class="mt-1">All cube interactions are processed client-side using WebGL.</p>
</div>
</div>
</footer>
`;
// Initialize feather icons in shadow DOM
const featherScript = document.createElement('script');
featherScript.src = 'https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js';
this.shadowRoot.appendChild(featherScript);
featherScript.onload = () => {
if (window.feather) {
window.feather.replace();
}
};
}
}
customElements.define('custom-footer', CustomFooter);