Download index.html from CSNET/wanderpin-visual-travel-diary-map: direct link, hf CLI and curl.
- Browser
- Download file 13.8 kB
-
https://huggingface.co/spaces/CSNET/wanderpin-visual-travel-diary-map/resolve/main/index.html
- Command line
-
hf download hf://spaces/CSNET/wanderpin-visual-travel-diary-map/index.html
-
curl -L -o index.html https://huggingface.co/spaces/CSNET/wanderpin-visual-travel-diary-map/resolve/main/index.html
13.8 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>WanderPin - My Travel Map</title> | |
| <link rel="icon" type="image/x-icon" href="/static/favicon.ico"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <link rel="stylesheet" href="style.css"> | |
| <script src="components/navbar.js"></script> | |
| <script src="components/footer.js"></script> | |
| <script src="components/travel-card.js"></script> | |
| <script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script> | |
| <link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" /> | |
| <script src="https://unpkg.com/leaflet.markercluster@1.5.3/dist/leaflet.markercluster.js"></script> | |
| <link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.css" /> | |
| <link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.Default.css" /> | |
| <style> | |
| #map { height: 500px; } | |
| .leaflet-popup-content { font-family: 'Inter', sans-serif; } | |
| .custom-marker { background: none; border: none; } | |
| </style> | |
| </head> | |
| <body class="bg-gradient-to-br from-gray-50 to-blue-50 min-h-screen"> | |
| <custom-navbar></custom-navbar> | |
| <main class="container mx-auto px-4 py-8 max-w-7xl"> | |
| <!-- Hero Section --> | |
| <section class="text-center mb-12"> | |
| <h1 class="text-5xl font-bold text-gray-800 mb-4">My Travel Journey <i data-feather="map-pin" class="inline-block text-blue-500"></i></h1> | |
| <p class="text-xl text-gray-600 max-w-3xl mx-auto">A visual diary of all the amazing places I've visited across Southeast Asia and beyond. Each pin tells a story!</p> | |
| <div class="mt-6"> | |
| <span class="inline-block px-4 py-2 bg-blue-100 text-blue-800 rounded-full text-sm font-semibold mr-2 mb-2">π 7 Destinations</span> | |
| <span class="inline-block px-4 py-2 bg-green-100 text-green-800 rounded-full text-sm font-semibold mr-2 mb-2">π 4 Countries</span> | |
| <span class="inline-block px-4 py-2 bg-purple-100 text-purple-800 rounded-full text-sm font-semibold mr-2 mb-2">βοΈ 1 Adventurer</span> | |
| </div> | |
| </section> | |
| <!-- Interactive Map Section --> | |
| <section class="mb-16"> | |
| <div class="bg-white rounded-2xl shadow-xl p-4 md:p-6 border border-gray-200"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h2 class="text-2xl font-bold text-gray-800 flex items-center"> | |
| <i data-feather="map" class="mr-2 text-blue-500"></i> Interactive Travel Map | |
| </h2> | |
| <button id="resetView" class="px-4 py-2 bg-blue-500 hover:bg-blue-600 text-white rounded-lg transition duration-300 flex items-center"> | |
| <i data-feather="refresh-cw" class="mr-2 w-4 h-4"></i> Reset View | |
| </button> | |
| </div> | |
| <p class="text-gray-600 mb-6">Click on any pin to see details about my visit. Drag and zoom to explore!</p> | |
| <div id="map" class="rounded-xl overflow-hidden border border-gray-300"></div> | |
| <div class="mt-4 text-sm text-gray-500 flex items-center"> | |
| <i data-feather="info" class="mr-2 w-4 h-4"></i> | |
| <span>Map data Β© OpenStreetMap contributors | Icons by Feather Icons</span> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Destinations Grid --> | |
| <section class="mb-16"> | |
| <h2 class="text-3xl font-bold text-gray-800 mb-8 text-center">My Travel Destinations</h2> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6"> | |
| <!-- Destination cards will be populated by JavaScript --> | |
| </div> | |
| </section> | |
| <!-- Travel Stats --> | |
| <section class="mb-16"> | |
| <div class="bg-gradient-to-r from-blue-500 to-purple-600 rounded-2xl shadow-xl p-8 text-white"> | |
| <h2 class="text-3xl font-bold mb-6 text-center">Travel Statistics</h2> | |
| <div class="grid grid-cols-2 md:grid-cols-4 gap-6"> | |
| <div class="text-center"> | |
| <div class="text-4xl font-bold mb-2">7</div> | |
| <div class="text-blue-100">Destinations</div> | |
| </div> | |
| <div class="text-center"> | |
| <div class="text-4xl font-bold mb-2">4</div> | |
| <div class="text-blue-100">Countries</div> | |
| </div> | |
| <div class="text-center"> | |
| <div class="text-4xl font-bold mb-2">1</div> | |
| <div class="text-blue-100">Continent</div> | |
| </div> | |
| <div class="text-center"> | |
| <div class="text-4xl font-bold mb-2">β</div> | |
| <div class="text-blue-100">Memories</div> | |
| </div> | |
| </div> | |
| <div class="mt-8 text-center"> | |
| <p class="text-blue-100 italic">"The world is a book and those who do not travel read only one page." - Saint Augustine</p> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Timeline Preview --> | |
| <section class="mb-16"> | |
| <div class="bg-white rounded-2xl shadow-xl p-6 border border-gray-200"> | |
| <h2 class="text-2xl font-bold text-gray-800 mb-6 flex items-center"> | |
| <i data-feather="clock" class="mr-2 text-blue-500"></i> Travel Timeline | |
| </h2> | |
| <div class="relative"> | |
| <div class="absolute left-1/2 transform -translate-x-1/2 h-full w-1 bg-blue-200"></div> | |
| <div class="mb-8 flex items-center"> | |
| <div class="w-1/2 pr-8 text-right"> | |
| <div class="bg-blue-100 p-4 rounded-lg inline-block"> | |
| <h3 class="font-bold text-blue-800">Bangkok, Thailand</h3> | |
| <p class="text-sm text-blue-600">The City of Angels</p> | |
| </div> | |
| </div> | |
| <div class="absolute left-1/2 transform -translate-x-1/2 w-4 h-4 bg-blue-500 rounded-full border-4 border-white"></div> | |
| <div class="w-1/2 pl-8"> | |
| <p class="text-gray-600">Vibrant street markets and majestic temples</p> | |
| </div> | |
| </div> | |
| <div class="mb-8 flex items-center"> | |
| <div class="w-1/2 pr-8 text-right"> | |
| <p class="text-gray-600">Island paradise with stunning beaches</p> | |
| </div> | |
| <div class="absolute left-1/2 transform -translate-x-1/2 w-4 h-4 bg-green-500 rounded-full border-4 border-white"></div> | |
| <div class="w-1/2 pl-8"> | |
| <div class="bg-green-100 p-4 rounded-lg inline-block"> | |
| <h3 class="font-bold text-green-800">Phuket, Thailand</h3> | |
| <p class="text-sm text-green-600">Tropical Paradise</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="text-center mt-6"> | |
| <a href="timeline.html" class="inline-flex items-center px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-lg transition duration-300"> | |
| View Full Timeline | |
| <i data-feather="arrow-right" class="ml-2 w-4 h-4"></i> | |
| </a> | |
| </div> | |
| </div> | |
| </section> | |
| </main> | |
| <custom-footer></custom-footer> | |
| <script src="script.js"></script> | |
| <script> | |
| feather.replace(); | |
| // Initialize map after DOM is loaded | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Map initialization | |
| const map = L.map('map').setView([15.8700, 100.9925], 5); | |
| L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { | |
| attribution: 'Β© OpenStreetMap contributors', | |
| maxZoom: 18, | |
| }).addTo(map); | |
| // Destination data with coordinates | |
| const destinations = [ | |
| { | |
| name: "Bangkok, Thailand", | |
| lat: 13.7563, | |
| lng: 100.5018, | |
| country: "Thailand", | |
| description: "Vibrant capital city with amazing street food and temples", | |
| icon: "map-pin", | |
| color: "blue", | |
| image: "http://static.photos/cityscape/640x360/101" | |
| }, | |
| { | |
| name: "Phuket, Thailand", | |
| lat: 7.8804, | |
| lng: 98.3923, | |
| country: "Thailand", | |
| description: "Tropical island paradise with stunning beaches", | |
| icon: "sun", | |
| color: "green", | |
| image: "http://static.photos/nature/640x360/102" | |
| }, | |
| { | |
| name: "Hong Kong", | |
| lat: 22.3193, | |
| lng: 114.1694, | |
| country: "China", | |
| description: "Bustling metropolis with stunning skyline", | |
| icon: "trending-up", | |
| color: "red", | |
| image: "http://static.photos/cityscape/640x360/103" | |
| }, | |
| { | |
| name: "Beijing, China", | |
| lat: 39.9042, | |
| lng: 116.4074, | |
| country: "China", | |
| description: "Ancient capital with rich history", | |
| icon: "flag", | |
| color: "red", | |
| image: "http://static.photos/travel/640x360/104" | |
| }, | |
| { | |
| name: "Singapore", | |
| lat: 1.3521, | |
| lng: 103.8198, | |
| country: "Singapore", | |
| description: "Garden city with modern architecture", | |
| icon: "feather", | |
| color: "blue", | |
| image: "http://static.photos/technology/640x360/105" | |
| }, | |
| { | |
| name: "Kuala Lumpur, Malaysia", | |
| lat: 3.1390, | |
| lng: 101.6869, | |
| country: "Malaysia", | |
| description: "Cultural melting pot with iconic towers", | |
| icon: "home", | |
| color: "yellow", | |
| image: "http://static.photos/cityscape/640x360/106" | |
| }, | |
| { | |
| name: "Hanoi, Vietnam", | |
| lat: 21.0285, | |
| lng: 105.8542, | |
| country: "Vietnam", | |
| description: "Charming city with French colonial architecture", | |
| icon: "coffee", | |
| color: "green", | |
| image: "http://static.photos/travel/640x360/107" | |
| } | |
| ]; | |
| // Create marker cluster group | |
| const markers = L.markerClusterGroup(); | |
| destinations.forEach(dest => { | |
| // Create custom icon | |
| const customIcon = L.divIcon({ | |
| html: `<div class="custom-marker"><i data-feather="${dest.icon}" style="color: ${dest.color}; width: 24px; height: 24px;"></i></div>`, | |
| className: 'custom-div-icon', | |
| iconSize: [30, 30], | |
| iconAnchor: [15, 30] | |
| }); | |
| const marker = L.marker([dest.lat, dest.lng], { icon: customIcon }); | |
| marker.bindPopup(` | |
| <div class="p-2"> | |
| <h3 class="font-bold text-lg">${dest.name}</h3> | |
| <p class="text-gray-600">${dest.country}</p> | |
| <p class="mt-2">${dest.description}</p> | |
| <img src="${dest.image}" alt="${dest.name}" class="mt-2 rounded-lg w-full h-32 object-cover"> | |
| </div> | |
| `); | |
| markers.addLayer(marker); | |
| }); | |
| map.addLayer(markers); | |
| // Reset view button | |
| document.getElementById('resetView').addEventListener('click', () => { | |
| map.setView([15.8700, 100.9925], 5); | |
| }); | |
| // Populate destination cards | |
| const gridContainer = document.querySelector('.grid'); | |
| destinations.forEach(dest => { | |
| const card = document.createElement('travel-card'); | |
| card.setAttribute('name', dest.name); | |
| card.setAttribute('country', dest.country); | |
| card.setAttribute('description', dest.description); | |
| card.setAttribute('image', dest.image); | |
| card.setAttribute('icon', dest.icon); | |
| card.setAttribute('color', dest.color); | |
| gridContainer.appendChild(card); | |
| }); | |
| // Update feather icons for markers | |
| setTimeout(() => feather.replace(), 100); | |
| }); | |
| </script> | |
| <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script> | |
| </body> | |
| </html> |