| class CustomFooter extends HTMLElement { |
| connectedCallback() { |
| this.attachShadow({ mode: 'open' }); |
| this.shadowRoot.innerHTML = ` |
| <style> |
| .footer-link { |
| transition: color 0.2s ease; |
| } |
| |
| .footer-link:hover { |
| color: #6366f1; |
| } |
| |
| .social-icon { |
| transition: all 0.2s ease; |
| } |
| |
| .social-icon:hover { |
| transform: translateY(-2px); |
| color: #6366f1; |
| } |
| </style> |
| |
| <footer class="bg-gray-800 border-t border-gray-700 py-12"> |
| <div class="container mx-auto px-4"> |
| <div class="grid grid-cols-1 md:grid-cols-4 gap-8"> |
| <div> |
| <div class="flex items-center mb-4"> |
| <div class="w-10 h-10 rounded-lg bg-primary-500 flex items-center justify-center mr-3"> |
| <i data-feather="code" class="text-white"></i> |
| </div> |
| <span class="text-xl font-bold">CodeDex</span> |
| </div> |
| <p class="text-gray-400 mb-4">Learn to code with fun challenges and a supportive community.</p> |
| <div class="flex space-x-4"> |
| <a href="#" class="social-icon text-gray-400"> |
| <i data-feather="twitter"></i> |
| </a> |
| <a href="#" class="social-icon text-gray-400"> |
| <i data-feather="github"></i> |
| </a> |
| <a href="#" class="social-icon text-gray-400"> |
| <i data-feather="discord"></i> |
| </a> |
| <a href="#" class="social-icon text-gray-400"> |
| <i data-feather="youtube"></i> |
| </a> |
| </div> |
| </div> |
| |
| <div> |
| <h3 class="text-lg font-semibold mb-4">Resources</h3> |
| <ul class="space-y-2"> |
| <li><a href="/learn" class="footer-link text-gray-400">Learning Paths</a></li> |
| <li><a href="/docs" class="footer-link text-gray-400">Documentation</a></li> |
| <li><a href="/cheatsheets" class="footer-link text-gray-400">Cheatsheets</a></li> |
| <li><a href="/tools" class="footer-link text-gray-400">Developer Tools</a></li> |
| </ul> |
| </div> |
| |
| <div> |
| <h3 class="text-lg font-semibold mb-4">Community</h3> |
| <ul class="space-y-2"> |
| <li><a href="/community" class="footer-link text-gray-400">Forum</a></li> |
| <li><a href="/events" class="footer-link text-gray-400">Events</a></li> |
| <li><a href="/leaderboard" class="footer-link text-gray-400">Leaderboard</a></li> |
| <li><a href="/mentors" class="footer-link text-gray-400">Mentors</a></li> |
| </ul> |
| </div> |
| |
| <div> |
| <h3 class="text-lg font-semibold mb-4">Resources</h3> |
| <ul class="space-y-2"> |
| <li><a href="/challenges" class="footer-link text-gray-400">Challenges</a></li> |
| <li><a href="/projects" class="footer-link text-gray-400">Projects</a></li> |
| <li><a href="/builds" class="footer-link text-gray-400">Builds</a></li> |
| <li><a href="/community/question-of-the-week" class="footer-link text-gray-400">QOTW</a></li> |
| </ul> |
| </div> |
| </div> |
| |
| <div class="border-t border-gray-700 mt-8 pt-8 flex flex-col md:flex-row justify-between items-center"> |
| <p class="text-gray-500 mb-4 md:mb-0">© 2023 CodeDex Clone. All rights reserved.</p> |
| <div class="flex space-x-6"> |
| <a href="#" class="footer-link text-gray-400">Terms</a> |
| <a href="#" class="footer-link text-gray-400">Privacy</a> |
| <a href="#" class="footer-link text-gray-400">Cookies</a> |
| </div> |
| </div> |
| </div> |
| </footer> |
| |
| <script> |
| feather.replace(); |
| </script> |
| `; |
| } |
| } |
|
|
| customElements.define('custom-footer', CustomFooter); |