Spaces:
Running
Running
| <html lang="en" class="scroll-smooth"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>RideShare Zen - Eco-Friendly Carpooling</title> | |
| <link rel="icon" type="image/x-icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>π</text></svg>"> | |
| <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> | |
| tailwind.config = { | |
| darkMode: 'class', | |
| theme: { | |
| extend: { | |
| colors: { | |
| primary: { | |
| 50: '#ecfdf5', | |
| 100: '#d1fae5', | |
| 200: '#a7f3d0', | |
| 300: '#6ee7b7', | |
| 400: '#34d399', | |
| 500: '#10b981', | |
| 600: '#059669', | |
| 700: '#047857', | |
| 800: '#065f46', | |
| 900: '#064e3b', | |
| }, | |
| secondary: { | |
| 50: '#fffbeb', | |
| 100: '#fef3c7', | |
| 200: '#fde68a', | |
| 300: '#fcd34d', | |
| 400: '#fbbf24', | |
| 500: '#f59e0b', | |
| 600: '#d97706', | |
| 700: '#b45309', | |
| 800: '#92400e', | |
| 900: '#78350f', | |
| } | |
| }, | |
| fontFamily: { | |
| sans: ['Inter', 'system-ui', 'sans-serif'], | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet"> | |
| </head> | |
| <body class="bg-gray-50 dark:bg-slate-900 text-gray-800 dark:text-gray-100 transition-colors duration-300 font-sans"> | |
| <app-navbar></app-navbar> | |
| <main id="app"> | |
| <!-- Dynamic content loaded here --> | |
| <section id="hero" class="min-h-screen flex items-center justify-center relative overflow-hidden pt-16 md:pt-0"> | |
| <div class="absolute inset-0 z-0"> | |
| <div class="absolute inset-0 bg-gradient-to-br from-primary-500/20 to-secondary-500/20 dark:from-primary-900/40 dark:to-secondary-900/40"></div> | |
| <img src="http://static.photos/cityscape/1200x630/42" alt="City background" class="w-full h-full object-cover opacity-20 dark:opacity-10"> | |
| </div> | |
| <div class="container mx-auto px-4 relative z-10"> | |
| <div class="max-w-4xl mx-auto text-center mb-8 md:mb-12"> | |
| <span class="inline-block px-3 py-1 md:px-4 md:py-1 rounded-full bg-primary-100 dark:bg-primary-900 text-primary-700 dark:text-primary-300 text-xs md:text-sm font-semibold mb-3 md:mb-4 animate-fade-in"> | |
| π± Sustainable Travel | |
| </span> | |
| <h1 class="text-3xl sm:text-5xl md:text-7xl font-bold mb-4 md:mb-6 bg-clip-text text-transparent bg-gradient-to-r from-primary-600 to-secondary-600 dark:from-primary-400 dark:to-secondary-400 leading-tight"> | |
| Share Rides,<br>Save the Planet | |
| </h1> | |
| <p class="text-base md:text-xl text-gray-600 dark:text-gray-300 mb-6 md:mb-8 max-w-2xl mx-auto px-2"> | |
| Connect with commuters heading your way. Split costs, reduce emissions, and make new friends on your journey. | |
| </p> | |
| </div> | |
| <div class="bg-white/80 dark:bg-slate-800/80 backdrop-blur-lg rounded-2xl md:rounded-3xl shadow-2xl p-4 md:p-8 max-w-4xl mx-auto border border-white/20"> | |
| <div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-3 md:gap-4 items-end"> | |
| <div class="space-y-1 md:space-y-2"> | |
| <label class="text-xs md:text-sm font-medium text-gray-700 dark:text-gray-300 ml-1">From</label> | |
| <div class="relative"> | |
| <i data-feather="map-pin" class="absolute left-3 top-2.5 md:top-3 text-gray-400 w-4 h-4 md:w-5 md:h-5"></i> | |
| <input type="text" placeholder="Departure city" id="search-from" | |
| class="w-full pl-9 md:pl-10 pr-3 md:pr-4 py-2.5 md:py-3 rounded-xl border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 focus:ring-2 focus:ring-primary-500 focus:border-transparent outline-none transition-all text-sm md:text-base"> | |
| </div> | |
| </div> | |
| <div class="space-y-1 md:space-y-2"> | |
| <label class="text-xs md:text-sm font-medium text-gray-700 dark:text-gray-300 ml-1">To</label> | |
| <div class="relative"> | |
| <i data-feather="navigation" class="absolute left-3 top-2.5 md:top-3 text-gray-400 w-4 h-4 md:w-5 md:h-5"></i> | |
| <input type="text" placeholder="Destination" id="search-to" | |
| class="w-full pl-9 md:pl-10 pr-3 md:pr-4 py-2.5 md:py-3 rounded-xl border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 focus:ring-2 focus:ring-primary-500 focus:border-transparent outline-none transition-all text-sm md:text-base"> | |
| </div> | |
| </div> | |
| <div class="space-y-1 md:space-y-2"> | |
| <label class="text-xs md:text-sm font-medium text-gray-700 dark:text-gray-300 ml-1">When</label> | |
| <div class="relative"> | |
| <i data-feather="calendar" class="absolute left-3 top-2.5 md:top-3 text-gray-400 w-4 h-4 md:w-5 md:h-5"></i> | |
| <input type="date" id="search-date" | |
| class="w-full pl-9 md:pl-10 pr-3 md:pr-4 py-2.5 md:py-3 rounded-xl border border-gray-200 dark:border-slate-600 bg-white dark:bg-slate-700 focus:ring-2 focus:ring-primary-500 focus:border-transparent outline-none transition-all text-gray-600 dark:text-gray-300 text-sm md:text-base"> | |
| </div> | |
| </div> | |
| <button onclick="searchRides()" | |
| class="w-full bg-gradient-to-r from-primary-600 to-primary-500 hover:from-primary-700 hover:to-primary-600 text-white font-semibold py-2.5 md:py-3 px-4 md:px-6 rounded-xl shadow-lg hover:shadow-xl transform hover:-translate-y-0.5 transition-all duration-200 flex items-center justify-center gap-2 text-sm md:text-base"> | |
| <i data-feather="search" class="w-4 h-4 md:w-5 md:h-5"></i> | |
| <span class="hidden sm:inline">Search Rides</span> | |
| <span class="sm:hidden">Search</span> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="mt-8 md:mt-12 flex justify-center gap-4 md:gap-8 text-center"> | |
| <div class="flex flex-col items-center"> | |
| <div class="w-10 h-10 md:w-12 md:h-12 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center mb-1.5 md:mb-2"> | |
| <i data-feather="users" class="text-primary-600 dark:text-primary-400 w-4 h-4 md:w-5 md:h-5"></i> | |
| </div> | |
| <span class="text-xs md:text-sm font-medium text-gray-600 dark:text-gray-400">10k+ Drivers</span> | |
| </div> | |
| <div class="flex flex-col items-center"> | |
| <div class="w-10 h-10 md:w-12 md:h-12 rounded-full bg-secondary-100 dark:bg-secondary-900 flex items-center justify-center mb-1.5 md:mb-2"> | |
| <i data-feather="shield" class="text-secondary-600 dark:text-secondary-400 w-4 h-4 md:w-5 md:h-5"></i> | |
| </div> | |
| <span class="text-xs md:text-sm font-medium text-gray-600 dark:text-gray-400">Verified</span> | |
| </div> | |
| <div class="flex flex-col items-center"> | |
| <div class="w-10 h-10 md:w-12 md:h-12 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center mb-1.5 md:mb-2"> | |
| <i data-feather="heart" class="text-primary-600 dark:text-primary-400 w-4 h-4 md:w-5 md:h-5"></i> | |
| </div> | |
| <span class="text-xs md:text-sm font-medium text-gray-600 dark:text-gray-400">Eco-Friendly</span> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <section id="rides" class="py-12 md:py-20 bg-white dark:bg-slate-800 hidden"> | |
| <div class="container mx-auto px-4"> | |
| <div class="flex flex-col sm:flex-row justify-between items-start sm:items-center mb-6 md:mb-8 gap-3"> | |
| <div> | |
| <h2 class="text-2xl md:text-3xl font-bold text-gray-900 dark:text-white">Available Rides</h2> | |
| <p class="text-sm md:text-base text-gray-600 dark:text-gray-400 mt-1" id="search-results-text">Showing rides near you</p> | |
| </div> | |
| <button onclick="showSection('hero')" class="text-primary-600 hover:text-primary-700 font-medium flex items-center gap-2 text-sm md:text-base"> | |
| <i data-feather="arrow-left" class="w-4 h-4"></i> Back to search | |
| </button> | |
| </div> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-6" id="rides-container"> | |
| <!-- Ride cards injected here --> | |
| </div> | |
| </div> | |
| </section> | |
| <section id="how-it-works" class="py-12 md:py-20 bg-gray-50 dark:bg-slate-900"> | |
| <div class="container mx-auto px-4"> | |
| <div class="text-center mb-10 md:mb-16"> | |
| <h2 class="text-2xl md:text-4xl font-bold mb-3 md:mb-4 text-gray-900 dark:text-white">How It Works</h2> | |
| <p class="text-base md:text-xl text-gray-600 dark:text-gray-400">Start sharing rides in three simple steps</p> | |
| </div> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-8 max-w-6xl mx-auto"> | |
| <div class="relative group"> | |
| <div class="absolute -inset-1 bg-gradient-to-r from-primary-600 to-secondary-600 rounded-2xl blur opacity-25 group-hover:opacity-50 transition duration-1000"></div> | |
| <div class="relative bg-white dark:bg-slate-800 p-6 md:p-8 rounded-2xl border border-gray-100 dark:border-slate-700"> | |
| <div class="w-12 h-12 md:w-14 md:h-14 bg-primary-100 dark:bg-primary-900 rounded-xl flex items-center justify-center mb-4 md:mb-6 text-xl md:text-2xl font-bold text-primary-600 dark:text-primary-400">1</div> | |
| <h3 class="text-lg md:text-xl font-bold mb-2 md:mb-3 text-gray-900 dark:text-white">Search Your Route</h3> | |
| <p class="text-sm md:text-base text-gray-600 dark:text-gray-400 leading-relaxed">Enter your departure and destination. Our smart algorithm finds the perfect ride matches along your route.</p> | |
| </div> | |
| </div> | |
| <div class="relative group"> | |
| <div class="absolute -inset-1 bg-gradient-to-r from-primary-600 to-secondary-600 rounded-2xl blur opacity-25 group-hover:opacity-50 transition duration-1000"></div> | |
| <div class="relative bg-white dark:bg-slate-800 p-6 md:p-8 rounded-2xl border border-gray-100 dark:border-slate-700"> | |
| <div class="w-12 h-12 md:w-14 md:h-14 bg-secondary-100 dark:bg-secondary-900 rounded-xl flex items-center justify-center mb-4 md:mb-6 text-xl md:text-2xl font-bold text-secondary-600 dark:text-secondary-400">2</div> | |
| <h3 class="text-lg md:text-xl font-bold mb-2 md:mb-3 text-gray-900 dark:text-white">Book Instantly</h3> | |
| <p class="text-sm md:text-base text-gray-600 dark:text-gray-400 leading-relaxed">Reserve your seat with one click. No hidden fees, no complicated booking process. Just seamless travel.</p> | |
| </div> | |
| </div> | |
| <div class="relative group"> | |
| <div class="absolute -inset-1 bg-gradient-to-r from-primary-600 to-secondary-600 rounded-2xl blur opacity-25 group-hover:opacity-50 transition duration-1000"></div> | |
| <div class="relative bg-white dark:bg-slate-800 p-6 md:p-8 rounded-2xl border border-gray-100 dark:border-slate-700"> | |
| <div class="w-12 h-12 md:w-14 md:h-14 bg-primary-100 dark:bg-primary-900 rounded-xl flex items-center justify-center mb-4 md:mb-6 text-xl md:text-2xl font-bold text-primary-600 dark:text-primary-400">3</div> | |
| <h3 class="text-lg md:text-xl font-bold mb-2 md:mb-3 text-gray-900 dark:text-white">Enjoy the Ride</h3> | |
| <p class="text-sm md:text-base text-gray-600 dark:text-gray-400 leading-relaxed">Meet your driver at the pickup point. Share stories, split costs, and arrive at your destination together.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <section id="offer-ride" class="py-12 md:py-20 bg-white dark:bg-slate-800 hidden"> | |
| <div class="container mx-auto px-4 max-w-2xl"> | |
| <div class="bg-gray-50 dark:bg-slate-700 rounded-2xl md:rounded-3xl p-6 md:p-12 shadow-xl"> | |
| <h2 class="text-2xl md:text-3xl font-bold mb-4 md:mb-6 text-center text-gray-900 dark:text-white">Offer a Ride</h2> | |
| <p class="text-center text-sm md:text-base text-gray-600 dark:text-gray-400 mb-6 md:mb-8">Share your journey and earn money while helping others</p> | |
| <form id="offer-form" class="space-y-4 md:space-y-6" onsubmit="offerRide(event)"> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-6"> | |
| <div> | |
| <label class="block text-xs md:text-sm font-medium text-gray-700 dark:text-gray-300 mb-1.5 md:mb-2">From</label> | |
| <input type="text" required class="w-full px-3 md:px-4 py-2.5 md:py-3 rounded-xl border border-gray-300 dark:border-slate-600 bg-white dark:bg-slate-800 focus:ring-2 focus:ring-primary-500 outline-none text-sm md:text-base"> | |
| </div> | |
| <div> | |
| <label class="block text-xs md:text-sm font-medium text-gray-700 dark:text-gray-300 mb-1.5 md:mb-2">To</label> | |
| <input type="text" required class="w-full px-3 md:px-4 py-2.5 md:py-3 rounded-xl border border-gray-300 dark:border-slate-600 bg-white dark:bg-slate-800 focus:ring-2 focus:ring-primary-500 outline-none text-sm md:text-base"> | |
| </div> | |
| </div> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-6"> | |
| <div> | |
| <label class="block text-xs md:text-sm font-medium text-gray-700 dark:text-gray-300 mb-1.5 md:mb-2">Date & Time</label> | |
| <input type="datetime-local" required class="w-full px-3 md:px-4 py-2.5 md:py-3 rounded-xl border border-gray-300 dark:border-slate-600 bg-white dark:bg-slate-800 focus:ring-2 focus:ring-primary-500 outline-none text-sm md:text-base"> | |
| </div> | |
| <div> | |
| <label class="block text-xs md:text-sm font-medium text-gray-700 dark:text-gray-300 mb-1.5 md:mb-2">Available Seats</label> | |
| <select class="w-full px-3 md:px-4 py-2.5 md:py-3 rounded-xl border border-gray-300 dark:border-slate-600 bg-white dark:bg-slate-800 focus:ring-2 focus:ring-primary-500 outline-none text-sm md:text-base"> | |
| <option>1 seat</option> | |
| <option>2 seats</option> | |
| <option>3 seats</option> | |
| <option>4 seats</option> | |
| </select> | |
| </div> | |
| </div> | |
| <div> | |
| <label class="block text-xs md:text-sm font-medium text-gray-700 dark:text-gray-300 mb-1.5 md:mb-2">Price per seat ($)</label> | |
| <input type="number" min="1" placeholder="25" required class="w-full px-3 md:px-4 py-2.5 md:py-3 rounded-xl border border-gray-300 dark:border-slate-600 bg-white dark:bg-slate-800 focus:ring-2 focus:ring-primary-500 outline-none text-sm md:text-base"> | |
| </div> | |
| <button type="submit" class="w-full bg-gradient-to-r from-secondary-500 to-secondary-600 hover:from-secondary-600 hover:to-secondary-700 text-white font-bold py-3 md:py-4 rounded-xl shadow-lg hover:shadow-xl transform hover:-translate-y-0.5 transition-all duration-200 text-sm md:text-base"> | |
| Publish Ride | |
| </button> | |
| </form> | |
| </div> | |
| </div> | |
| </section> | |
| </main> | |
| <app-footer></app-footer> | |
| <script src="components/navbar.js"></script> | |
| <script src="components/ride-card.js"></script> | |
| <script src="components/footer.js"></script> | |
| <script src="script.js"></script> | |
| <script>feather.replace();</script> | |
| <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script> | |
| </body> | |
| </html> |