Download components/footer.js from CSNET/wanderpin-visual-travel-diary-map: direct link, hf CLI and curl.
- Browser
- Download file 8.76 kB
-
https://huggingface.co/spaces/CSNET/wanderpin-visual-travel-diary-map/resolve/main/components/footer.js
- Command line
-
hf download hf://spaces/CSNET/wanderpin-visual-travel-diary-map/components/footer.js
-
curl -L -o footer.js https://huggingface.co/spaces/CSNET/wanderpin-visual-travel-diary-map/resolve/main/components/footer.js
8.76 kB
| class CustomFooter extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| :host { | |
| display: block; | |
| width: 100%; | |
| } | |
| footer { | |
| background: linear-gradient(135deg, #1e293b, #0f172a); | |
| color: white; | |
| } | |
| .footer-link { | |
| transition: all 0.3s ease; | |
| position: relative; | |
| } | |
| .footer-link::before { | |
| content: ''; | |
| position: absolute; | |
| bottom: -2px; | |
| left: 0; | |
| width: 0; | |
| height: 2px; | |
| background: #60a5fa; | |
| transition: width 0.3s ease; | |
| } | |
| .footer-link:hover::before { | |
| width: 100%; | |
| } | |
| .social-icon { | |
| transition: all 0.3s ease; | |
| } | |
| .social-icon:hover { | |
| transform: translateY(-3px); | |
| } | |
| .back-to-top { | |
| animation: float 3s ease-in-out infinite; | |
| } | |
| @keyframes float { | |
| 0%, 100% { | |
| transform: translateY(0); | |
| } | |
| 50% { | |
| transform: translateY(-5px); | |
| } | |
| } | |
| </style> | |
| <footer class="mt-16"> | |
| <div class="container mx-auto px-4 py-12"> | |
| <div class="grid grid-cols-1 md:grid-cols-4 gap-8"> | |
| <!-- Brand Section --> | |
| <div class="space-y-4"> | |
| <div class="flex items-center space-x-2"> | |
| <i data-feather="map-pin" class="w-8 h-8 text-blue-400"></i> | |
| <span class="text-2xl font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent">WanderPin</span> | |
| </div> | |
| <p class="text-gray-400 text-sm"> | |
| Visualize your travel memories. Pin your journey. Share your story. | |
| </p> | |
| <div class="flex space-x-4"> | |
| <a href="#" class="social-icon"> | |
| <i data-feather="instagram" class="w-5 h-5 text-gray-400 hover:text-pink-400"></i> | |
| </a> | |
| <a href="#" class="social-icon"> | |
| <i data-feather="twitter" class="w-5 h-5 text-gray-400 hover:text-blue-400"></i> | |
| </a> | |
| <a href="#" class="social-icon"> | |
| <i data-feather="facebook" class="w-5 h-5 text-gray-400 hover:text-blue-600"></i> | |
| </a> | |
| <a href="#" class="social-icon"> | |
| <i data-feather="github" class="w-5 h-5 text-gray-400 hover:text-gray-200"></i> | |
| </a> | |
| </div> | |
| </div> | |
| <!-- Quick Links --> | |
| <div> | |
| <h3 class="text-lg font-semibold mb-4 text-white">Quick Links</h3> | |
| <ul class="space-y-2"> | |
| <li><a href="index.html" class="footer-link text-gray-400 hover:text-white">Home</a></li> | |
| <li><a href="timeline.html" class="footer-link text-gray-400 hover:text-white">Timeline</a></li> | |
| <li><a href="gallery.html" class="footer-link text-gray-400 hover:text-white">Gallery</a></li> | |
| <li><a href="stats.html" class="footer-link text-gray-400 hover:text-white">Statistics</a></li> | |
| <li><a href="about.html" class="footer-link text-gray-400 hover:text-white">About</a></li> | |
| </ul> | |
| </div> | |
| <!-- Destinations --> | |
| <div> | |
| <h3 class="text-lg font-semibold mb-4 text-white">Destinations</h3> | |
| <ul class="space-y-2"> | |
| <li><a href="#" class="footer-link text-gray-400 hover:text-white">Bangkok</a></li> | |
| <li><a href="#" class="footer-link text-gray-400 hover:text-white">Phuket</a></li> | |
| <li><a href="#" class="footer-link text-gray-400 hover:text-white">Hong Kong</a></li> | |
| <li><a href="#" class="footer-link text-gray-400 hover:text-white">China</a></li> | |
| <li><a href="#" class="footer-link text-gray-400 hover:text-white">Singapore</a></li> | |
| </ul> | |
| </div> | |
| <!-- Newsletter --> | |
| <div> | |
| <h3 class="text-lg font-semibold mb-4 text-white">Stay Updated</h3> | |
| <p class="text-gray-400 text-sm mb-4"> | |
| Subscribe to get travel tips and updates | |
| </p> | |
| <div class="flex"> | |
| <input type="email" placeholder="Your email" | |
| class="flex-grow px-4 py-2 rounded-l-lg bg-gray-800 text-white border border-gray-700 focus:outline-none focus:border-blue-500"> | |
| <button class="px-4 py-2 bg-blue-500 hover:bg-blue-600 text-white rounded-r-lg transition-colors"> | |
| <i data-feather="send" class="w-4 h-4"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Divider --> | |
| <div class="border-t border-gray-800 my-8"></div> | |
| <!-- Bottom Bar --> | |
| <div class="flex flex-col md:flex-row justify-between items-center"> | |
| <p class="text-gray-500 text-sm"> | |
| © 2024 WanderPin. All rights reserved. Made with <i data-feather="heart" class="w-4 h-4 inline text-red-400"></i> for travelers. | |
| </p> | |
| <div class="flex items-center space-x-6 mt-4 md:mt-0"> | |
| <a href="#" class="footer-link text-gray-500 hover:text-white text-sm">Privacy Policy</a> | |
| <a href="#" class="footer-link text-gray-500 hover:text-white text-sm">Terms of Service</a> | |
| <a href="#" class="footer-link text-gray-500 hover:text-white text-sm">Cookie Policy</a> | |
| </div> | |
| </div> | |
| <!-- Back to Top --> | |
| <button id="backToTop" class="back-to-top fixed bottom-8 right-8 p-3 bg-blue-500 hover:bg-blue-600 text-white rounded-full shadow-lg transition-all duration-300 opacity-0"> | |
| <i data-feather="arrow-up" class="w-5 h-5"></i> | |
| </button> | |
| </div> | |
| </footer> | |
| `; | |
| this.initEventListeners(); | |
| } | |
| initEventListeners() { | |
| // Back to top button | |
| const backToTop = this.shadowRoot.getElementById('backToTop'); | |
| window.addEventListener('scroll', () => { | |
| if (window.scrollY > 300) { | |
| backToTop.style.opacity = '1'; | |
| backToTop.style.transform = 'translateY(0)'; | |
| } else { | |
| backToTop.style.opacity = '0'; | |
| backToTop.style.transform = 'translateY(20px)'; | |
| } | |
| }); | |
| backToTop.addEventListener('click', () => { | |
| window.scrollTo({ | |
| top: 0, | |
| behavior: 'smooth' | |
| }); | |
| }); | |
| // Update feather icons | |
| setTimeout(() => { | |
| feather.replace(); | |
| }, 100); | |
| } | |
| } | |
| customElements.define('custom-footer', CustomFooter); |