jibu / index.html
MilesCodes's picture
Add 3 files
208fe5b verified
Raw History Blame Contribute Delete
71 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>JibuMoyo - Water Delivery in Juba</title> <script src="https://cdn.tailwindcss.com"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet"> <style> body { font-family: 'Poppins', sans-serif; background-color: #f8fafc; } .map-container { height: 400px; width: 100%; } .truck-marker { background-color: #3b82f6; color: white; padding: 5px 10px; border-radius: 20px; font-weight: bold; display: flex; align-items: center; } .truck-marker i { margin-right: 5px; } .rating-stars { color: #f59e0b; } .nav-active { color: #3b82f6; border-bottom: 2px solid #3b82f6; } .slide-in { animation: slideIn 0.3s forwards; } @keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } } </style> </head> <body class="max-w-md mx-auto bg-gray-50"> <!-- Authentication Screen --> <div id="authScreen" class="min-h-screen flex flex-col justify-center p-6"> <div class="text-center mb-8"> <img src="https://via.placeholder.com/100" alt="JibuMoyo Logo" class="mx-auto h-20 w-20 rounded-full"> <h1 class="text-3xl font-bold text-blue-600 mt-4">JibuMoyo</h1> <p class="text-gray-600">Water delivery service for Juba</p> </div> <div id="loginForm" class="bg-white p-6 rounded-lg shadow-md"> <h2 class="text-xl font-semibold mb-4 text-center">Login</h2> <div class="mb-4"> <label class="block text-gray-700 mb-2" for="loginEmail">Email</label> <input type="email" id="loginEmail" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> <div class="mb-6"> <label class="block text-gray-700 mb-2" for="loginPassword">Password</label> <input type="password" id="loginPassword" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> <button onclick="login()" class="w-full bg-blue-600 text-white py-2 rounded-lg hover:bg-blue-700 transition duration-200 mb-4">Login</button> <p class="text-center text-gray-600">Don't have an account? <span onclick="showRegister()" class="text-blue-600 cursor-pointer">Register</span></p> </div> <div id="registerForm" class="bg-white p-6 rounded-lg shadow-md hidden"> <h2 class="text-xl font-semibold mb-4 text-center">Register</h2> <div class="mb-4"> <label class="block text-gray-700 mb-2" for="regName">Full Name</label> <input type="text" id="regName" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> <div class="mb-4"> <label class="block text-gray-700 mb-2" for="regEmail">Email</label> <input type="email" id="regEmail" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> <div class="mb-4"> <label class="block text-gray-700 mb-2" for="regPhone">Phone Number</label> <input type="tel" id="regPhone" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> <div class="mb-4"> <label class="block text-gray-700 mb-2" for="regPassword">Password</label> <input type="password" id="regPassword" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> <div class="mb-4"> <label class="block text-gray-700 mb-2" for="regConfirmPassword">Confirm Password</label> <input type="password" id="regConfirmPassword" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> <div class="mb-4"> <label class="block text-gray-700 mb-2">User Type</label> <div class="flex space-x-4"> <label class="inline-flex items-center"> <input type="radio" name="userType" value="customer" checked class="text-blue-600"> <span class="ml-2">Customer</span> </label> <label class="inline-flex items-center"> <input type="radio" name="userType" value="driver" class="text-blue-600"> <span class="ml-2">Driver</span> </label> </div> </div> <button onclick="register()" class="w-full bg-blue-600 text-white py-2 rounded-lg hover:bg-blue-700 transition duration-200 mb-4">Register</button> <p class="text-center text-gray-600">Already have an account? <span onclick="showLogin()" class="text-blue-600 cursor-pointer">Login</span></p> </div> </div> <!-- Main App Container (hidden initially) --> <div id="appContainer" class="hidden min-h-screen flex flex-col"> <!-- Header --> <header class="bg-blue-600 text-white p-4 shadow-md"> <div class="flex justify-between items-center"> <div class="flex items-center"> <img src="https://via.placeholder.com/40" alt="Logo" class="h-8 w-8 rounded-full mr-2"> <h1 class="text-xl font-bold">JibuMoyo</h1> </div> <div class="flex items-center space-x-3"> <button onclick="showNotifications()" class="relative"> <i class="fas fa-bell text-xl"></i> <span class="absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-4 w-4 flex items-center justify-center">3</span> </button> <button onclick="showProfile()"> <img src="https://via.placeholder.com/30" alt="Profile" class="h-8 w-8 rounded-full"> </button> </div> </div> </header> <!-- Main Content Area --> <main class="flex-1 overflow-y-auto p-4"> <!-- Home Screen --> <div id="homeScreen"> <div class="bg-white rounded-lg shadow-md p-4 mb-4"> <h2 class="text-lg font-semibold mb-2">Welcome back, <span id="userName">User</span>!</h2> <p class="text-gray-600 mb-4">Get clean water delivered to your location in Juba</p> <button onclick="navigateTo('mapScreen')" class="w-full bg-blue-600 text-white py-3 rounded-lg hover:bg-blue-700 transition duration-200 flex items-center justify-center"> <i class="fas fa-truck mr-2"></i> Request Water Delivery </button> </div> <div class="bg-white rounded-lg shadow-md p-4 mb-4"> <h2 class="text-lg font-semibold mb-2">Quick Actions</h2> <div class="grid grid-cols-2 gap-3"> <button onclick="navigateTo('myDeliveriesScreen')" class="bg-blue-50 text-blue-600 p-3 rounded-lg flex flex-col items-center"> <i class="fas fa-history text-xl mb-1"></i> <span>My Deliveries</span> </button> <button onclick="navigateTo('paymentScreen')" class="bg-green-50 text-green-600 p-3 rounded-lg flex flex-col items-center"> <i class="fas fa-wallet text-xl mb-1"></i> <span>Payment</span> </button> <button onclick="navigateTo('ratingsScreen')" class="bg-yellow-50 text-yellow-600 p-3 rounded-lg flex flex-col items-center"> <i class="fas fa-star text-xl mb-1"></i> <span>Ratings</span> </button> <button onclick="showSupport()" class="bg-purple-50 text-purple-600 p-3 rounded-lg flex flex-col items-center"> <i class="fas fa-headset text-xl mb-1"></i> <span>Support</span> </button> </div> </div> <div class="bg-white rounded-lg shadow-md p-4"> <h2 class="text-lg font-semibold mb-2">Recent Deliveries</h2> <div class="space-y-3"> <div class="border-b pb-2"> <div class="flex justify-between"> <span class="font-medium">10,000 liters</span> <span class="text-green-600">Completed</span> </div> <div class="text-sm text-gray-500">Yesterday, 3:45 PM</div> </div> <div class="border-b pb-2"> <div class="flex justify-between"> <span class="font-medium">5,000 liters</span> <span class="text-blue-600">In Progress</span> </div> <div class="text-sm text-gray-500">Today, 10:30 AM</div> </div> </div> </div> </div> <!-- Map Screen --> <div id="mapScreen" class="hidden"> <div class="bg-white rounded-lg shadow-md p-4 mb-4"> <h2 class="text-lg font-semibold mb-2">Find Water Trucks Near You</h2> <div class="relative"> <input type="text" placeholder="Search location" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 mb-2"> <i class="fas fa-search absolute right-3 top-3 text-gray-400"></i> </div> </div> <div class="bg-white rounded-lg shadow-md overflow-hidden"> <div class="map-container" id="map"> <!-- Google Map will be rendered here --> <div class="flex items-center justify-center h-full bg-gray-200"> <div class="text-center"> <i class="fas fa-map-marker-alt text-4xl text-blue-500 mb-2"></i> <p class="text-gray-600">Map loading...</p> </div> </div> </div> <div class="p-4"> <div class="flex justify-between items-center mb-3"> <h3 class="font-semibold">Available Trucks</h3> <span class="text-sm text-gray-500">5 nearby</span> </div> <div class="space-y-3"> <div class="border rounded-lg p-3 hover:bg-blue-50 cursor-pointer" onclick="showDriverProfile('driver1')"> <div class="flex justify-between"> <div> <h4 class="font-medium">John Deng</h4> <div class="flex items-center text-sm text-gray-500"> <i class="fas fa-truck mr-1"></i> <span>JUB 123A</span> </div> </div> <div class="text-right"> <div class="rating-stars"> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star-half-alt"></i> </div> <div class="text-sm text-gray-500">1.2 km away</div> </div> </div> </div> <div class="border rounded-lg p-3 hover:bg-blue-50 cursor-pointer" onclick="showDriverProfile('driver2')"> <div class="flex justify-between"> <div> <h4 class="font-medium">Mary Akech</h4> <div class="flex items-center text-sm text-gray-500"> <i class="fas fa-truck mr-1"></i> <span>JUB 456B</span> </div> </div> <div class="text-right"> <div class="rating-stars"> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="far fa-star"></i> </div> <div class="text-sm text-gray-500">2.5 km away</div> </div> </div> </div> </div> </div> </div> </div> <!-- Request Water Screen --> <div id="requestWaterScreen" class="hidden"> <div class="bg-white rounded-lg shadow-md p-4 mb-4"> <h2 class="text-lg font-semibold mb-4">Request Water Delivery</h2> <div class="mb-4"> <label class="block text-gray-700 mb-2">Select Truck</label> <div class="border rounded-lg p-3 bg-blue-50"> <div class="flex justify-between items-center"> <div> <h4 class="font-medium">John Deng</h4> <div class="flex items-center text-sm text-gray-500"> <i class="fas fa-truck mr-1"></i> <span>JUB 123A</span> </div> </div> <button onclick="navigateTo('mapScreen')" class="text-blue-600 text-sm">Change</button> </div> </div> </div> <div class="mb-4"> <label class="block text-gray-700 mb-2">Quantity Needed</label> <div class="flex items-center border rounded-lg overflow-hidden"> <button class="bg-gray-200 px-4 py-2" onclick="decrementQuantity()">-</button> <input type="number" id="waterQuantity" value="1000" min="500" step="500" class="w-full px-4 py-2 text-center focus:outline-none"> <button class="bg-gray-200 px-4 py-2" onclick="incrementQuantity()">+</button> </div> <div class="text-sm text-gray-500 mt-1">Minimum order: 500 liters</div> </div> <div class="mb-4"> <label class="block text-gray-700 mb-2">Delivery Location</label> <div class="relative"> <input type="text" id="deliveryLocation" placeholder="Enter delivery address" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> <button class="absolute right-3 top-3 text-blue-500" onclick="getCurrentLocation()"> <i class="fas fa-location-arrow"></i> </button> </div> </div> <div class="mb-4"> <label class="block text-gray-700 mb-2">Preferred Time</label> <input type="datetime-local" id="deliveryTime" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> <div class="mb-4"> <label class="block text-gray-700 mb-2">Special Instructions</label> <textarea id="specialInstructions" rows="2" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Any special instructions for the driver?"></textarea> </div> <button onclick="submitWaterRequest()" class="w-full bg-blue-600 text-white py-3 rounded-lg hover:bg-blue-700 transition duration-200"> <i class="fas fa-paper-plane mr-2"></i> Send Request </button> </div> </div> <!-- Driver Profile Screen --> <div id="driverProfileScreen" class="hidden"> <div class="bg-white rounded-lg shadow-md p-4 mb-4"> <div class="flex items-center mb-4"> <img src="https://via.placeholder.com/80" alt="Driver" class="h-16 w-16 rounded-full mr-4"> <div> <h2 class="text-xl font-semibold">John Deng</h2> <div class="flex items-center"> <div class="rating-stars mr-2"> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star-half-alt"></i> </div> <span class="text-gray-600">4.5 (24 reviews)</span> </div> </div> </div> <div class="grid grid-cols-2 gap-4 mb-4"> <div class="bg-blue-50 p-3 rounded-lg"> <div class="text-gray-500 text-sm">Truck Plate</div> <div class="font-medium">JUB 123A</div> </div> <div class="bg-blue-50 p-3 rounded-lg"> <div class="text-gray-500 text-sm">Truck Color</div> <div class="font-medium">Blue</div> </div> <div class="bg-blue-50 p-3 rounded-lg"> <div class="text-gray-500 text-sm">Capacity</div> <div class="font-medium">10,000 liters</div> </div> <div class="bg-blue-50 p-3 rounded-lg"> <div class="text-gray-500 text-sm">Phone</div> <div class="font-medium">+211 912 345 678</div> </div> </div> <div class="mb-4"> <h3 class="font-semibold mb-2">About</h3> <p class="text-gray-600">Experienced water delivery driver serving Juba for over 5 years. Available 7 days a week from 8AM to 6PM.</p> </div> <button onclick="navigateTo('requestWaterScreen')" class="w-full bg-blue-600 text-white py-3 rounded-lg hover:bg-blue-700 transition duration-200 mb-4"> <i class="fas fa-tint mr-2"></i> Request Water </button> <div> <h3 class="font-semibold mb-2">Recent Reviews</h3> <div class="space-y-3"> <div class="border-b pb-3"> <div class="flex justify-between mb-1"> <span class="font-medium">Sarah K.</span> <div class="rating-stars"> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> </div> </div> <p class="text-gray-600 text-sm">John arrived on time and was very professional. The water was clean and delivery was smooth.</p> </div> <div class="border-b pb-3"> <div class="flex justify-between mb-1"> <span class="font-medium">Michael T.</span> <div class="rating-stars"> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="far fa-star"></i> </div> </div> <p class="text-gray-600 text-sm">Good service but was 15 minutes late. Otherwise everything was fine.</p> </div> </div> </div> </div> </div> <!-- My Deliveries Screen --> <div id="myDeliveriesScreen" class="hidden"> <div class="bg-white rounded-lg shadow-md p-4 mb-4"> <h2 class="text-lg font-semibold mb-4">My Deliveries</h2> <div class="flex border-b mb-4"> <button id="pendingTab" class="px-4 py-2 font-medium nav-active" onclick="switchDeliveryTab('pending')">Pending</button> <button id="completedTab" class="px-4 py-2 font-medium text-gray-500" onclick="switchDeliveryTab('completed')">Completed</button> </div> <div id="pendingDeliveries"> <div class="border rounded-lg p-4 mb-3"> <div class="flex justify-between mb-2"> <span class="font-medium">5,000 liters</span> <span class="text-blue-600">In Progress</span> </div> <div class="text-sm text-gray-500 mb-2">Today, 10:30 AM</div> <div class="flex items-center text-sm mb-2"> <i class="fas fa-truck mr-2 text-blue-500"></i> <span>John Deng (JUB 123A)</span> </div> <div class="flex justify-between items-center"> <button onclick="viewDeliveryDetails('delivery1')" class="text-blue-600 text-sm">View Details</button> <button onclick="cancelDelivery('delivery1')" class="text-red-600 text-sm">Cancel</button> </div> </div> </div> <div id="completedDeliveries" class="hidden"> <div class="border rounded-lg p-4 mb-3"> <div class="flex justify-between mb-2"> <span class="font-medium">10,000 liters</span> <span class="text-green-600">Completed</span> </div> <div class="text-sm text-gray-500 mb-2">Yesterday, 3:45 PM</div> <div class="flex items-center text-sm mb-2"> <i class="fas fa-truck mr-2 text-blue-500"></i> <span>Mary Akech (JUB 456B)</span> </div> <div class="flex justify-between items-center"> <button onclick="viewDeliveryDetails('delivery2')" class="text-blue-600 text-sm">View Details</button> <button onclick="rateDelivery('delivery2')" class="text-yellow-600 text-sm">Rate</button> </div> </div> </div> </div> </div> <!-- Payment Screen --> <div id="paymentScreen" class="hidden"> <div class="bg-white rounded-lg shadow-md p-4 mb-4"> <h2 class="text-lg font-semibold mb-4">Payment Methods</h2> <div class="mb-6"> <h3 class="font-medium mb-2">Select Payment Method</h3> <div class="space-y-3"> <label class="flex items-center p-3 border rounded-lg cursor-pointer hover:bg-blue-50"> <input type="radio" name="paymentMethod" value="momo" class="text-blue-600 mr-3"> <div class="flex-1"> <div class="font-medium">MTN Momo</div> <div class="text-sm text-gray-500">Pay via MTN Mobile Money</div> </div> <img src="https://via.placeholder.com/40" alt="Momo" class="h-8"> </label> <label class="flex items-center p-3 border rounded-lg cursor-pointer hover:bg-blue-50"> <input type="radio" name="paymentMethod" value="mgurush" class="text-blue-600 mr-3"> <div class="flex-1"> <div class="font-medium">mGurush</div> <div class="text-sm text-gray-500">Pay via mGurush wallet</div> </div> <img src="https://via.placeholder.com/40" alt="mGurush" class="h-8"> </label> <label class="flex items-center p-3 border rounded-lg cursor-pointer hover:bg-blue-50"> <input type="radio" name="paymentMethod" value="digicash" class="text-blue-600 mr-3"> <div class="flex-1"> <div class="font-medium">DigiCash</div> <div class="text-sm text-gray-500">Pay via DigiCash account</div> </div> <img src="https://via.placeholder.com/40" alt="DigiCash" class="h-8"> </label> <label class="flex items-center p-3 border rounded-lg cursor-pointer hover:bg-blue-50"> <input type="radio" name="paymentMethod" value="cash" class="text-blue-600 mr-3"> <div class="flex-1"> <div class="font-medium">Cash on Delivery</div> <div class="text-sm text-gray-500">Pay in cash when water is delivered</div> </div> <i class="fas fa-money-bill-wave text-green-500 text-xl"></i> </label> </div> </div> <div class="bg-blue-50 rounded-lg p-4 mb-6"> <h3 class="font-medium mb-2">Payment Summary</h3> <div class="space-y-2"> <div class="flex justify-between"> <span class="text-gray-600">Water (10,000 liters)</span> <span>SSP 15,000</span> </div> <div class="flex justify-between"> <span class="text-gray-600">Delivery Fee</span> <span>SSP 2,500</span> </div> <div class="border-t pt-2 mt-2 flex justify-between font-medium"> <span>Total</span> <span>SSP 17,500</span> </div> </div> </div> <button onclick="processPayment()" class="w-full bg-blue-600 text-white py-3 rounded-lg hover:bg-blue-700 transition duration-200"> <i class="fas fa-lock mr-2"></i> Complete Payment </button> </div> </div> <!-- Ratings Screen --> <div id="ratingsScreen" class="hidden"> <div class="bg-white rounded-lg shadow-md p-4 mb-4"> <h2 class="text-lg font-semibold mb-4">Rate Your Delivery</h2> <div class="border rounded-lg p-4 mb-4"> <div class="flex items-center mb-3"> <img src="https://via.placeholder.com/50" alt="Driver" class="h-10 w-10 rounded-full mr-3"> <div> <div class="font-medium">John Deng</div> <div class="text-sm text-gray-500">JUB 123A</div> </div> </div> <div class="mb-4"> <label class="block text-gray-700 mb-2">How was your experience?</label> <div class="flex justify-center space-x-2 text-3xl"> <i class="far fa-star rating-star cursor-pointer hover:text-yellow-400" data-rating="1" onmouseover="hoverStar(1)" onmouseout="resetStars()" onclick="setRating(1)"></i> <i class="far fa-star rating-star cursor-pointer hover:text-yellow-400" data-rating="2" onmouseover="hoverStar(2)" onmouseout="resetStars()" onclick="setRating(2)"></i> <i class="far fa-star rating-star cursor-pointer hover:text-yellow-400" data-rating="3" onmouseover="hoverStar(3)" onmouseout="resetStars()" onclick="setRating(3)"></i> <i class="far fa-star rating-star cursor-pointer hover:text-yellow-400" data-rating="4" onmouseover="hoverStar(4)" onmouseout="resetStars()" onclick="setRating(4)"></i> <i class="far fa-star rating-star cursor-pointer hover:text-yellow-400" data-rating="5" onmouseover="hoverStar(5)" onmouseout="resetStars()" onclick="setRating(5)"></i> </div> <div id="ratingText" class="text-center text-sm text-gray-500 mt-1">Tap to rate</div> </div> <div class="mb-4"> <label class="block text-gray-700 mb-2">Comments (optional)</label> <textarea id="ratingComments" rows="3" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Share your experience..."></textarea> </div> <button onclick="submitRating()" class="w-full bg-blue-600 text-white py-2 rounded-lg hover:bg-blue-700 transition duration-200"> Submit Rating </button> </div> <div> <h3 class="font-semibold mb-2">Your Previous Ratings</h3> <div class="space-y-3"> <div class="border rounded-lg p-3"> <div class="flex justify-between mb-1"> <span class="font-medium">Mary Akech</span> <div class="rating-stars"> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="far fa-star"></i> </div> </div> <p class="text-gray-600 text-sm">"Good service but truck was a bit late."</p> <div class="text-xs text-gray-500 mt-1">2 weeks ago</div> </div> </div> </div> </div> </div> </main> <!-- Bottom Navigation --> <nav class="bg-white border-t flex justify-around items-center p-2"> <button onclick="navigateTo('homeScreen')" class="p-2 flex flex-col items-center text-blue-600"> <i class="fas fa-home text-xl"></i> <span class="text-xs">Home</span> </button> <button onclick="navigateTo('mapScreen')" class="p-2 flex flex-col items-center text-gray-500"> <i class="fas fa-map-marker-alt text-xl"></i> <span class="text-xs">Map</span> </button> <button onclick="navigateTo('myDeliveriesScreen')" class="p-2 flex flex-col items-center text-gray-500"> <i class="fas fa-tint text-xl"></i> <span class="text-xs">Deliveries</span> </button> <button onclick="navigateTo('paymentScreen')" class="p-2 flex flex-col items-center text-gray-500"> <i class="fas fa-wallet text-xl"></i> <span class="text-xs">Payment</span> </button> </nav> </div> <!-- Notification Panel (hidden initially) --> <div id="notificationPanel" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden"> <div class="absolute top-0 right-0 h-full w-3/4 bg-white slide-in"> <div class="p-4 border-b flex justify-between items-center"> <h2 class="text-xl font-semibold">Notifications</h2> <button onclick="hideNotifications()" class="text-gray-500"> <i class="fas fa-times"></i> </button> </div> <div class="p-4 overflow-y-auto h-full"> <div class="space-y-3"> <div class="border-b pb-3"> <div class="flex justify-between mb-1"> <span class="font-medium">Delivery Accepted</span> <span class="text-xs text-gray-500">10 min ago</span> </div> <p class="text-sm text-gray-600">John Deng has accepted your water delivery request for 5,000 liters.</p> </div> <div class="border-b pb-3"> <div class="flex justify-between mb-1"> <span class="font-medium">Payment Received</span> <span class="text-xs text-gray-500">2 hours ago</span> </div> <p class="text-sm text-gray-600">Your payment of SSP 17,500 has been received successfully.</p> </div> <div class="border-b pb-3"> <div class="flex justify-between mb-1"> <span class="font-medium">New Driver Available</span> <span class="text-xs text-gray-500">5 hours ago</span> </div> <p class="text-sm text-gray-600">Mary Akech is now available in your area with 10,000 liter capacity.</p> </div> </div> </div> </div> </div> <!-- Profile Panel (hidden initially) --> <div id="profilePanel" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden"> <div class="absolute top-0 right-0 h-full w-3/4 bg-white slide-in"> <div class="p-4 border-b flex justify-between items-center"> <h2 class="text-xl font-semibold">My Profile</h2> <button onclick="hideProfile()" class="text-gray-500"> <i class="fas fa-times"></i> </button> </div> <div class="p-4 overflow-y-auto h-full"> <div class="flex flex-col items-center mb-6"> <img src="https://via.placeholder.com/100" alt="Profile" class="h-20 w-20 rounded-full mb-3"> <h3 class="text-lg font-semibold">Alex Johnson</h3> <p class="text-gray-600">Customer</p> </div> <div class="space-y-4"> <div class="bg-gray-100 p-4 rounded-lg"> <h4 class="font-medium mb-2">Account Information</h4> <div class="space-y-2"> <div class="flex justify-between"> <span class="text-gray-600">Email:</span> <span>alex@example.com</span> </div> <div class="flex justify-between"> <span class="text-gray-600">Phone:</span> <span>+211 912 345 678</span> </div> <div class="flex justify-between"> <span class="text-gray-600">Address:</span> <span>123 Juba Town</span> </div> </div> </div> <div class="bg-gray-100 p-4 rounded-lg"> <h4 class="font-medium mb-2">Settings</h4> <div class="space-y-3"> <button class="w-full text-left flex justify-between items-center"> <span>Notification Settings</span> <i class="fas fa-chevron-right text-gray-400"></i> </button> <button class="w-full text-left flex justify-between items-center"> <span>Payment Methods</span> <i class="fas fa-chevron-right text-gray-400"></i> </button> <button class="w-full text-left flex justify-between items-center"> <span>Delivery History</span> <i class="fas fa-chevron-right text-gray-400"></i> </button> </div> </div> <button onclick="logout()" class="w-full bg-red-600 text-white py-2 rounded-lg hover:bg-red-700 transition duration-200"> <i class="fas fa-sign-out-alt mr-2"></i> Logout </button> </div> </div> </div> </div> <!-- Delivery Details Modal (hidden initially) --> <div id="deliveryDetailsModal" class="fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center hidden"> <div class="bg-white rounded-lg w-11/12 max-w-md"> <div class="p-4 border-b flex justify-between items-center"> <h2 class="text-xl font-semibold">Delivery Details</h2> <button onclick="hideDeliveryDetails()" class="text-gray-500"> <i class="fas fa-times"></i> </button> </div> <div class="p-4"> <div class="space-y-3 mb-4"> <div class="flex justify-between"> <span class="text-gray-600">Quantity:</span> <span class="font-medium">5,000 liters</span> </div> <div class="flex justify-between"> <span class="text-gray-600">Delivery Address:</span> <span class="font-medium">123 Juba Town</span> </div> <div class="flex justify-between"> <span class="text-gray-600">Scheduled Time:</span> <span class="font-medium">Today, 10:30 AM</span> </div> <div class="flex justify-between"> <span class="text-gray-600">Driver:</span> <span class="font-medium">John Deng (JUB 123A)</span> </div> <div class="flex justify-between"> <span class="text-gray-600">Status:</span> <span class="text-blue-600 font-medium">In Progress</span> </div> <div class="flex justify-between"> <span class="text-gray-600">Payment:</span> <span class="font-medium">SSP 8,750 (Paid via Momo)</span> </div> </div> <div class="flex space-x-3"> <button onclick="contactDriver()" class="flex-1 bg-blue-600 text-white py-2 rounded-lg hover:bg-blue-700 transition duration-200"> <i class="fas fa-phone mr-2"></i> Call Driver </button> <button onclick="trackDelivery()" class="flex-1 bg-green-600 text-white py-2 rounded-lg hover:bg-green-700 transition duration-200"> <i class="fas fa-map-marker-alt mr-2"></i> Track </button> </div> </div> </div> </div> <!-- Support Modal (hidden initially) --> <div id="supportModal" class="fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center hidden"> <div class="bg-white rounded-lg w-11/12 max-w-md"> <div class="p-4 border-b flex justify-between items-center"> <h2 class="text-xl font-semibold">Customer Support</h2> <button onclick="hideSupport()" class="text-gray-500"> <i class="fas fa-times"></i> </button> </div> <div class="p-4"> <div class="mb-4"> <p class="text-gray-600 mb-3">How can we help you today?</p> <textarea id="supportMessage" rows="4" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Describe your issue..."></textarea> </div> <div class="space-y-3 mb-4"> <button class="w-full text-left flex items-center p-3 border rounded-lg hover:bg-gray-50"> <i class="fas fa-phone-alt text-blue-500 mr-3"></i> <div> <div class="font-medium">Call Support</div> <div class="text-sm text-gray-500">+211 912 987 654</div> </div> </button> <button class="w-full text-left flex items-center p-3 border rounded-lg hover:bg-gray-50"> <i class="fas fa-envelope text-blue-500 mr-3"></i> <div> <div class="font-medium">Email Us</div> <div class="text-sm text-gray-500">support@jibumoyo.com</div> </div> </button> </div> <button onclick="submitSupportRequest()" class="w-full bg-blue-600 text-white py-2 rounded-lg hover:bg-blue-700 transition duration-200"> <i class="fas fa-paper-plane mr-2"></i> Send Message </button> </div> </div> </div> <!-- Payment Success Modal (hidden initially) --> <div id="paymentSuccessModal" class="fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center hidden"> <div class="bg-white rounded-lg w-11/12 max-w-md p-6 text-center"> <div class="text-green-500 text-5xl mb-4"> <i class="fas fa-check-circle"></i> </div> <h2 class="text-xl font-semibold mb-2">Payment Successful!</h2> <p class="text-gray-600 mb-6">Your payment of SSP 17,500 has been processed successfully.</p> <button onclick="hidePaymentSuccess()" class="w-full bg-blue-600 text-white py-2 rounded-lg hover:bg-blue-700 transition duration-200"> Continue </button> </div> </div> <!-- Rating Success Modal (hidden initially) --> <div id="ratingSuccessModal" class="fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center hidden"> <div class="bg-white rounded-lg w-11/12 max-w-md p-6 text-center"> <div class="text-yellow-500 text-5xl mb-4"> <i class="fas fa-star"></i> </div> <h2 class="text-xl font-semibold mb-2">Thank You!</h2> <p class="text-gray-600 mb-6">Your rating has been submitted successfully.</p> <button onclick="hideRatingSuccess()" class="w-full bg-blue-600 text-white py-2 rounded-lg hover:bg-blue-700 transition duration-200"> Continue </button> </div> </div> <script> // Current user state let currentUser = null; let currentScreen = 'homeScreen'; let currentRating = 0; // Mock data for trucks const trucks = [ { id: 'driver1', name: 'John Deng', plate: 'JUB 123A', phone: '+211 912 345 678', rating: 4.5, color: 'Blue', distance: '1.2 km', capacity: '10,000 liters', about: 'Experienced water delivery driver serving Juba for over 5 years. Available 7 days a week from 8AM to 6PM.', reviews: [ { name: 'Sarah K.', rating: 5, comment: 'John arrived on time and was very professional. The water was clean and delivery was smooth.' }, { name: 'Michael T.', rating: 4, comment: 'Good service but was 15 minutes late. Otherwise everything was fine.' } ] }, { id: 'driver2', name: 'Mary Akech', plate: 'JUB 456B', phone: '+211 923 456 789', rating: 4, color: 'White', distance: '2.5 km', capacity: '8,000 liters', about: 'Reliable female driver with 3 years experience. Specializes in deliveries to hotels and businesses.', reviews: [ { name: 'Alex J.', rating: 4, comment: 'Good service but truck was a bit late.' } ] } ]; // Mock deliveries data const deliveries = [ { id: 'delivery1', quantity: '5,000 liters', address: '123 Juba Town', time: 'Today, 10:30 AM', driver: 'John Deng (JUB 123A)', status: 'In Progress', payment: 'SSP 8,750 (Paid via Momo)' }, { id: 'delivery2', quantity: '10,000 liters', address: '456 Juba Market', time: 'Yesterday, 3:45 PM', driver: 'Mary Akech (JUB 456B)', status: 'Completed', payment: 'SSP 17,500 (Cash on delivery)' } ]; // Initialize the app function initApp() { // Check if user is logged in (in a real app, this would check Firebase auth state) const loggedIn = localStorage.getItem('jibumoyo_loggedIn'); if (loggedIn === 'true') { currentUser = JSON.parse(localStorage.getItem('jibumoyo_user')); document.getElementById('authScreen').classList.add('hidden'); document.getElementById('appContainer').classList.remove('hidden'); document.getElementById('userName').textContent = currentUser.name; } } // Show register form function showRegister() { document.getElementById('loginForm').classList.add('hidden'); document.getElementById('registerForm').classList.remove('hidden'); } // Show login form function showLogin() { document.getElementById('registerForm').classList.add('hidden'); document.getElementById('loginForm').classList.remove('hidden'); } // Login function function login() { const email = document.getElementById('loginEmail').value; const password = document.getElementById('loginPassword').value; // Simple validation if (!email || !password) { alert('Please enter both email and password'); return; } // In a real app, this would authenticate with Firebase // For demo purposes, we'll use mock data currentUser = { name: 'Alex Johnson', email: email, phone: '+211 912 345 678', type: 'customer' }; localStorage.setItem('jibumoyo_loggedIn', 'true'); localStorage.setItem('jibumoyo_user', JSON.stringify(currentUser)); document.getElementById('authScreen').classList.add('hidden'); document.getElementById('appContainer').classList.remove('hidden'); document.getElementById('userName').textContent = currentUser.name; } // Register function function register() { const name = document.getElementById('regName').value; const email = document.getElementById('regEmail').value; const phone = document.getElementById('regPhone').value; const password = document.getElementById('regPassword').value; const confirmPassword = document.getElementById('regConfirmPassword').value; const userType = document.querySelector('input[name="userType"]:checked').value; // Simple validation if (!name || !email || !phone || !password || !confirmPassword) { alert('Please fill in all fields'); return; } if (password !== confirmPassword) { alert('Passwords do not match'); return; } // In a real app, this would create a user in Firebase // For demo purposes, we'll use mock data currentUser = { name: name, email: email, phone: phone, type: userType }; localStorage.setItem('jibumoyo_loggedIn', 'true'); localStorage.setItem('jibumoyo_user', JSON.stringify(currentUser)); document.getElementById('authScreen').classList.add('hidden'); document.getElementById('appContainer').classList.remove('hidden'); document.getElementById('userName').textContent = currentUser.name; } // Logout function function logout() { localStorage.removeItem('jibumoyo_loggedIn'); localStorage.removeItem('jibumoyo_user'); currentUser = null; hideProfile(); document.getElementById('appContainer').classList.add('hidden'); document.getElementById('authScreen').classList.remove('hidden'); // Reset forms document.getElementById('loginEmail').value = ''; document.getElementById('loginPassword').value = ''; document.getElementById('regName').value = ''; document.getElementById('regEmail').value = ''; document.getElementById('regPhone').value = ''; document.getElementById('regPassword').value = ''; document.getElementById('regConfirmPassword').value = ''; document.querySelector('input[name="userType"][value="customer"]').checked = true; showLogin(); } // Navigation functions function navigateTo(screenId) { // Hide all screens document.querySelectorAll('main > div').forEach(div => { div.classList.add('hidden'); }); // Show the selected screen document.getElementById(screenId).classList.remove('hidden'); // Update current screen currentScreen = screenId; // Update active nav button document.querySelectorAll('nav button').forEach(btn => { btn.classList.remove('text-blue-600'); btn.classList.add('text-gray-500'); }); // Set active nav button based on screen if (screenId === 'homeScreen') { document.querySelector('nav button:nth-child(1)').classList.remove('text-gray-500'); document.querySelector('nav button:nth-child(1)').classList.add('text-blue-600'); } else if (screenId === 'mapScreen') { document.querySelector('nav button:nth-child(2)').classList.remove('text-gray-500'); document.querySelector('nav button:nth-child(2)').classList.add('text-blue-600'); } else if (screenId === 'myDeliveriesScreen') { document.querySelector('nav button:nth-child(3)').classList.remove('text-gray-500'); document.querySelector('nav button:nth-child(3)').classList.add('text-blue-600'); } else if (screenId === 'paymentScreen') { document.querySelector('nav button:nth-child(4)').classList.remove('text-gray-500'); document.querySelector('nav button:nth-child(4)').classList.add('text-blue-600'); } } // Show notifications panel function showNotifications() { document.getElementById('notificationPanel').classList.remove('hidden'); } // Hide notifications panel function hideNotifications() { document.getElementById('notificationPanel').classList.add('hidden'); } // Show profile panel function showProfile() { document.getElementById('profilePanel').classList.remove('hidden'); } // Hide profile panel function hideProfile() { document.getElementById('profilePanel').classList.add('hidden'); } // Show driver profile function showDriverProfile(driverId) { const driver = trucks.find(t => t.id === driverId); if (!driver) return; // Update driver profile screen with driver data document.getElementById('driverProfileScreen').querySelector('img').src = `https://via.placeholder.com/80?text=${driver.name.charAt(0)}`; document.getElementById('driverProfileScreen').querySelector('h2').textContent = driver.name; const ratingStars = document.getElementById('driverProfileScreen').querySelector('.rating-stars'); ratingStars.innerHTML = ''; for (let i = 1; i <= 5; i++) { const star = document.createElement('i'); if (i <= Math.floor(driver.rating)) { star.className = 'fas fa-star'; } else if (i === Math.ceil(driver.rating) && driver.rating % 1 > 0) { star.className = 'fas fa-star-half-alt'; } else { star.className = 'far fa-star'; } ratingStars.appendChild(star); } document.getElementById('driverProfileScreen').querySelector('.rating-stars + span').textContent = `${driver.rating} (${driver.reviews.length} reviews)`; const infoGrid = document.getElementById('driverProfileScreen').querySelector('.grid.grid-cols-2'); infoGrid.innerHTML = ` <div class="bg-blue-50 p-3 rounded-lg"> <div class="text-gray-500 text-sm">Truck Plate</div> <div class="font-medium">${driver.plate}</div> </div> <div class="bg-blue-50 p-3 rounded-lg"> <div class="text-gray-500 text-sm">Truck Color</div> <div class="font-medium">${driver.color}</div> </div> <div class="bg-blue-50 p-3 rounded-lg"> <div class="text-gray-500 text-sm">Capacity</div> <div class="font-medium">${driver.capacity}</div> </div> <div class="bg-blue-50 p-3 rounded-lg"> <div class="text-gray-500 text-sm">Phone</div> <div class="font-medium">${driver.phone}</div> </div> `; document.getElementById('driverProfileScreen').querySelector('p.text-gray-600').textContent = driver.about; const reviewsContainer = document.getElementById('driverProfileScreen').querySelector('.space-y-3'); reviewsContainer.innerHTML = ''; driver.reviews.forEach(review => { const reviewDiv = document.createElement('div'); reviewDiv.className = 'border-b pb-3'; reviewDiv.innerHTML = ` <div class="flex justify-between mb-1"> <span class="font-medium">${review.name}</span> <div class="rating-stars"> ${Array(5).fill().map((_, i) => `<i class="${i < review.rating ? 'fas' : 'far'} fa-star"></i>` ).join('')} </div> </div> <p class="text-gray-600 text-sm">"${review.comment}"</p> `; reviewsContainer.appendChild(reviewDiv); }); // Show driver profile screen navigateTo('driverProfileScreen'); } // Switch between pending and completed deliveries tabs function switchDeliveryTab(tab) { if (tab === 'pending') { document.getElementById('pendingTab').classList.add('nav-active'); document.getElementById('pendingTab').classList.remove('text-gray-500'); document.getElementById('completedTab').classList.remove('nav-active'); document.getElementById('completedTab').classList.add('text-gray-500'); document.getElementById('pendingDeliveries').classList.remove('hidden'); document.getElementById('completedDeliveries').classList.add('hidden'); } else { document.getElementById('completedTab').classList.add('nav-active'); document.getElementById('completedTab').classList.remove('text-gray-500'); document.getElementById('pendingTab').classList.remove('nav-active'); document.getElementById('pendingTab').classList.add('text-gray-500'); document.getElementById('completedDeliveries').classList.remove('hidden'); document.getElementById('pendingDeliveries').classList.add('hidden'); } } // View delivery details function viewDeliveryDetails(deliveryId) { const delivery = deliveries.find(d => d.id === deliveryId); if (!delivery) return; // Update modal with delivery details const modal = document.getElementById('deliveryDetailsModal'); modal.querySelector('span.font-medium:nth-of-type(1)').textContent = delivery.quantity; modal.querySelector('span.font-medium:nth-of-type(2)').textContent = delivery.address; modal.querySelector('span.font-medium:nth-of-type(3)').textContent = delivery.time; modal.querySelector('span.font-medium:nth-of-type(4)').textContent = delivery.driver; const statusSpan = modal.querySelector('span.text-blue-600'); statusSpan.textContent = delivery.status; if (delivery.status === 'Completed') { statusSpan.classList.remove('text-blue-600'); statusSpan.classList.add('text-green-600'); } else { statusSpan.classList.remove('text-green-600'); statusSpan.classList.add('text-blue-600'); } modal.querySelector('span.font-medium:nth-of-type(5)').textContent = delivery.payment; // Show modal modal.classList.remove('hidden'); } // Hide delivery details modal function hideDeliveryDetails() { document.getElementById('deliveryDetailsModal').classList.add('hidden'); } // Cancel delivery function cancelDelivery(deliveryId) { if (confirm('Are you sure you want to cancel this delivery?')) { alert('Delivery cancelled successfully'); // In a real app, this would update the delivery status in Firebase } } // Rate delivery function rateDelivery(deliveryId) { // For demo, we'll just show the rating screen navigateTo('ratingsScreen'); } // Contact driver function contactDriver() { alert('Calling driver...'); hideDeliveryDetails(); } // Track delivery function trackDelivery() { alert('Opening map to track delivery...'); hideDeliveryDetails(); navigateTo('mapScreen'); } // Increment water quantity function incrementQuantity() { const quantityInput = document.getElementById('waterQuantity'); let value = parseInt(quantityInput.value) || 0; value += 500; quantityInput.value = value; } // Decrement water quantity function decrementQuantity() { const quantityInput = document.getElementById('waterQuantity'); let value = parseInt(quantityInput.value) || 0; if (value > 500) { value -= 500; quantityInput.value = value; } } // Get current location function getCurrentLocation() { alert('Getting your current location...'); // In a real app, this would use the Geolocation API document.getElementById('deliveryLocation').value = '123 Juba Town (Current Location)'; } // Submit water request function submitWaterRequest() { const quantity = document.getElementById('waterQuantity').value; const location = document.getElementById('deliveryLocation').value; const time = document.getElementById('deliveryTime').value; if (!quantity || !location) { alert('Please fill in all required fields'); return; } // In a real app, this would save to Firebase alert(`Water request submitted: ${quantity} liters to ${location} at ${time || 'earliest possible'}`); navigateTo('homeScreen'); } // Process payment function processPayment() { const paymentMethod = document.querySelector('input[name="paymentMethod"]:checked'); if (!paymentMethod) { alert('Please select a payment method'); return; } // In a real app, this would process payment via appropriate API alert(`Processing payment via ${paymentMethod.value}...`); document.getElementById('paymentSuccessModal').classList.remove('hidden'); } // Hide payment success modal function hidePaymentSuccess() { document.getElementById('paymentSuccessModal').classList.add('hidden'); navigateTo('homeScreen'); } // Show support modal function showSupport() { document.getElementById('supportModal').classList.remove('hidden'); } // Hide support modal function hideSupport() { document.getElementById('supportModal').classList.add('hidden'); } // Submit support request function submitSupportRequest() { const message = document.getElementById('supportMessage').value; if (!message) { alert('Please describe your issue'); return; } alert('Support request submitted. We will contact you soon.'); hideSupport(); } // Hover star in rating function hoverStar(rating) { const stars = document.querySelectorAll('.rating-star'); stars.forEach((star, index) => { if (index < rating) { star.classList.remove('far', 'fa-star'); star.classList.add('fas', 'fa-star', 'text-yellow-400'); } else { star.classList.remove('fas', 'fa-star', 'text-yellow-400'); star.classList.add('far', 'fa-star'); } }); const ratingText = document.getElementById('ratingText'); const texts = ['Tap to rate', 'Poor', 'Fair', 'Good', 'Very Good', 'Excellent']; ratingText.textContent = texts[rating]; } // Reset stars to current rating function resetStars() { hoverStar(currentRating); } // Set rating function setRating(rating) { currentRating = rating; const stars = document.querySelectorAll('.rating-star'); stars.forEach((star, index) => { star.dataset.rating = index + 1; if (index < rating) { star.classList.remove('far'); star.classList.add('fas', 'text-yellow-500'); } else { star.classList.remove('fas', 'text-yellow-500'); star.classList.add('far'); } }); const ratingText = document.getElementById('ratingText'); const texts = ['Tap to rate', 'Poor', 'Fair', 'Good', 'Very Good', 'Excellent']; ratingText.textContent = texts[rating]; } // Submit rating function submitRating() { if (currentRating === 0) { alert('Please select a rating'); return; } const comment = document.getElementById('ratingComments').value; // In a real app, this would save to Firebase alert(`Rating submitted: ${currentRating} stars${comment ? ' with comment' : ''}`); document.getElementById('ratingSuccessModal').classList.remove('hidden'); } // Hide rating success modal function hideRatingSuccess() { document.getElementById('ratingSuccessModal').classList.add('hidden'); navigateTo('homeScreen'); } // Initialize the app when the page loads window.onload = initApp; </script> <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=MilesCodes/jibu" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> </html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JibuMoyo - Water Delivery in Juba</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Poppins', sans-serif;
background-color: #f8fafc;
}
.map-container {
height: 400px;
width: 100%;
}
.truck-marker {
background-color: #3b82f6;
color: white;
padding: 5px 10px;
border-radius: 20px;
font-weight: bold;
display: flex;
align-items: center;
}
.truck-marker i {
margin-right: 5px;
}
.rating-stars {
color: #f59e0b;
}
.nav-active {
color: #3b82f6;
border-bottom: 2px solid #3b82f6;
}
.slide-in {
animation: slideIn 0.3s forwards;
}
@keyframes slideIn {
from { transform: translateX(100%); }
to { transform: translateX(0); }
}
</style>
</head>
<body class="max-w-md mx-auto bg-gray-50">
<!-- Authentication Screen -->
<div id="authScreen" class="min-h-screen flex flex-col justify-center p-6">
<div class="text-center mb-8">
<img src="https://via.placeholder.com/100" alt="JibuMoyo Logo" class="mx-auto h-20 w-20 rounded-full">
<h1 class="text-3xl font-bold text-blue-600 mt-4">JibuMoyo</h1>
<p class="text-gray-600">Water delivery service for Juba</p>
</div>
<div id="loginForm" class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-xl font-semibold mb-4 text-center">Login</h2>
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="loginEmail">Email</label>
<input type="email" id="loginEmail" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="mb-6">
<label class="block text-gray-700 mb-2" for="loginPassword">Password</label>
<input type="password" id="loginPassword" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<button onclick="login()" class="w-full bg-blue-600 text-white py-2 rounded-lg hover:bg-blue-700 transition duration-200 mb-4">Login</button>
<p class="text-center text-gray-600">Don't have an account? <span onclick="showRegister()" class="text-blue-600 cursor-pointer">Register</span></p>
</div>
<div id="registerForm" class="bg-white p-6 rounded-lg shadow-md hidden">
<h2 class="text-xl font-semibold mb-4 text-center">Register</h2>
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="regName">Full Name</label>
<input type="text" id="regName" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="regEmail">Email</label>
<input type="email" id="regEmail" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="regPhone">Phone Number</label>
<input type="tel" id="regPhone" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="regPassword">Password</label>
<input type="password" id="regPassword" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="regConfirmPassword">Confirm Password</label>
<input type="password" id="regConfirmPassword" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="mb-4">
<label class="block text-gray-700 mb-2">User Type</label>
<div class="flex space-x-4">
<label class="inline-flex items-center">
<input type="radio" name="userType" value="customer" checked class="text-blue-600">
<span class="ml-2">Customer</span>
</label>
<label class="inline-flex items-center">
<input type="radio" name="userType" value="driver" class="text-blue-600">