Spaces:
Running
Running
Download index.html from Arrel18/mapquest-navigator: direct link, hf CLI and curl.
- Browser
- Download file 4.87 kB
-
https://huggingface.co/spaces/Arrel18/mapquest-navigator/resolve/main/index.html
- Command line
-
hf download hf://spaces/Arrel18/mapquest-navigator/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Arrel18/mapquest-navigator/resolve/main/index.html
4.87 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>MapQuest Navigator 🗺️</title> | |
| <link rel="stylesheet" href="style.css"> | |
| <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> | |
| <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places"></script> | |
| <script src="components/navbar.js"></script> | |
| <script src="components/footer.js"></script> | |
| </head> | |
| <body class="bg-gray-50 min-h-screen flex flex-col"> | |
| <custom-navbar></custom-navbar> | |
| <main class="flex-grow container mx-auto px-4 py-8"> | |
| <div class="max-w-4xl mx-auto"> | |
| <h1 class="text-3xl font-bold text-gray-800 mb-6">Explore the World 🌍</h1> | |
| <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8"> | |
| <div class="p-4 border-b border-gray-200"> | |
| <div class="flex items-center"> | |
| <i data-feather="search" class="text-gray-500 mr-2"></i> | |
| <input id="search-input" type="text" placeholder="Search for places..." | |
| class="w-full px-3 py-2 text-gray-700 focus:outline-none"> | |
| </div> | |
| </div> | |
| <div id="map" class="h-96 w-full"></div> | |
| </div> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-6"> | |
| <div class="bg-white p-6 rounded-xl shadow-md"> | |
| <div class="flex items-center mb-4"> | |
| <div class="p-3 rounded-full bg-blue-100 text-blue-600 mr-4"> | |
| <i data-feather="compass"></i> | |
| </div> | |
| <h3 class="text-lg font-semibold text-gray-800">Explore Nearby</h3> | |
| </div> | |
| <p class="text-gray-600">Discover interesting places around your current location or any area you search for.</p> | |
| </div> | |
| <div class="bg-white p-6 rounded-xl shadow-md"> | |
| <div class="flex items-center mb-4"> | |
| <div class="p-3 rounded-full bg-green-100 text-green-600 mr-4"> | |
| <i data-feather="map-pin"></i> | |
| </div> | |
| <h3 class="text-lg font-semibold text-gray-800">Save Locations</h3> | |
| </div> | |
| <p class="text-gray-600">Bookmark your favorite spots and access them anytime from your saved places.</p> | |
| </div> | |
| <div class="bg-white p-6 rounded-xl shadow-md"> | |
| <div class="flex items-center mb-4"> | |
| <div class="p-3 rounded-full bg-purple-100 text-purple-600 mr-4"> | |
| <i data-feather="navigation"></i> | |
| </div> | |
| <h3 class="text-lg font-semibold text-gray-800">Get Directions</h3> | |
| </div> | |
| <p class="text-gray-600">Plan your route with step-by-step navigation for walking, driving, or public transport.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| <custom-footer></custom-footer> | |
| <script src="script.js"></script> | |
| <script> | |
| feather.replace(); | |
| // Initialize Google Maps | |
| function initMap() { | |
| const map = new google.maps.Map(document.getElementById("map"), { | |
| center: { lat: -34.397, lng: 150.644 }, | |
| zoom: 8, | |
| }); | |
| const searchBox = new google.maps.places.SearchBox( | |
| document.getElementById("search-input") | |
| ); | |
| map.addListener("bounds_changed", () => { | |
| searchBox.setBounds(map.getBounds()); | |
| }); | |
| searchBox.addListener("places_changed", () => { | |
| const places = searchBox.getPlaces(); | |
| if (places.length === 0) return; | |
| const bounds = new google.maps.LatLngBounds(); | |
| places.forEach((place) => { | |
| if (!place.geometry) return; | |
| if (place.geometry.viewport) { | |
| bounds.union(place.geometry.viewport); | |
| } else { | |
| bounds.extend(place.geometry.location); | |
| } | |
| }); | |
| map.fitBounds(bounds); | |
| }); | |
| } | |
| // Load the Google Maps API | |
| window.initMap = initMap; | |
| </script> | |
| <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script> | |
| </body> | |
| </html> |