Spaces:
Running
Running
| <html lang="en" class="light"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Live Status | RailRush Express</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> | |
| <style> | |
| .material-card { | |
| border-radius: 12px; | |
| box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); | |
| } | |
| .status-running { | |
| background-color: #4CAF50; | |
| animation: pulse 2s infinite; | |
| } | |
| .status-delayed { | |
| background-color: #FF9800; | |
| } | |
| .status-cancelled { | |
| background-color: #F44336; | |
| } | |
| @keyframes pulse { | |
| 0% { opacity: 1; } | |
| 50% { opacity: 0.5; } | |
| 100% { opacity: 1; } | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-background-light dark:bg-background-dark min-h-screen"> | |
| <!-- Top App Bar --> | |
| <header class="bg-primary-light dark:bg-primary-dark text-white p-4 shadow-md"> | |
| <div class="flex justify-between items-center max-w-6xl mx-auto"> | |
| <div class="flex items-center space-x-2"> | |
| <a href="index.html"> | |
| <i data-feather="arrow-left" class="w-5 h-5"></i> | |
| </a> | |
| <h1 class="text-xl font-bold">Live Status</h1> | |
| </div> | |
| <div class="flex items-center space-x-4"> | |
| <button id="refresh-btn" class="p-2 rounded-full hover:bg-opacity-20 hover:bg-white"> | |
| <i data-feather="refresh-cw" class="w-5 h-5"></i> | |
| </button> | |
| <button id="theme-toggle" class="p-2 rounded-full hover:bg-opacity-20 hover:bg-white"> | |
| <i data-feather="moon" class="w-5 h-5 hidden dark:block"></i> | |
| <i data-feather="sun" class="w-5 h-5 block dark:hidden"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Main Content --> | |
| <main class="max-w-6xl mx-auto px-4 py-6"> | |
| <!-- Search Train Status --> | |
| <section class="material-card bg-white dark:bg-gray-800 p-6 mb-6"> | |
| <h2 class="text-xl font-semibold mb-4 dark:text-white">Check Train Status</h2> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4"> | |
| <div> | |
| <label class="block text-sm font-medium mb-1 dark:text-gray-300">Train Number/Name</label> | |
| <div class="relative"> | |
| <input type="text" id="train-input" class="w-full p-3 border rounded-material bg-gray-50 dark:bg-gray-700 dark:border-gray-600 dark:text-white" placeholder="12952 or Rajdhani Express"> | |
| <i data-feather="search" class="absolute right-3 top-3 text-gray-400"></i> | |
| </div> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium mb-1 dark:text-gray-300">Date</label> | |
| <div class="relative"> | |
| <input type="date" id="status-date" class="w-full p-3 border rounded-material bg-gray-50 dark:bg-gray-700 dark:border-gray-600 dark:text-white"> | |
| </div> | |
| </div> | |
| </div> | |
| <button id="check-status-btn" class="w-full md:w-auto bg-primary-light dark:bg-primary-dark text-white py-3 px-6 rounded-material font-medium hover:bg-opacity-90 transition"> | |
| Check Status | |
| </button> | |
| </section> | |
| <!-- Status Results --> | |
| <section id="status-results" class="hidden"> | |
| <h2 class="text-lg font-semibold mb-4 dark:text-white">Train Status</h2> | |
| <div class="material-card bg-white dark:bg-gray-800 p-4 mb-6"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <div> | |
| <h3 class="font-bold dark:text-white">Rajdhani Express (12952)</h3> | |
| <p class="text-sm text-gray-500 dark:text-gray-400">Delhi → Mumbai</p> | |
| </div> | |
| <span class="chip status-running text-white px-3 py-1 rounded-full text-sm">Running</span> | |
| </div> | |
| <div class="space-y-4"> | |
| <!-- Current Station --> | |
| <div class="bg-blue-50 dark:bg-gray-700 p-3 rounded-material"> | |
| <div class="flex items-center space-x-2"> | |
| <i data-feather="map-pin" class="w-4 h-4 text-blue-500 dark:text-blue-400"></i> | |
| <span class="font-medium dark:text-white">Currently at: New Delhi (NDLS)</span> | |
| </div> | |
| <div class="flex items-center space-x-2 mt-1"> | |
| <i data-feather="clock" class="w-4 h-4 text-blue-500 dark:text-blue-400"></i> | |
| <span class="text-sm dark:text-gray-300">Actual: 16:30 (5 min late)</span> | |
| </div> | |
| </div> | |
| <!-- Next Station --> | |
| <div class="p-3"> | |
| <div class="flex items-center space-x-2"> | |
| <i data-feather="chevron-right" class="w-4 h-4 text-gray-500 dark:text-gray-400"></i> | |
| <span class="font-medium dark:text-white">Next: Mathura Junction (MTJ)</span> | |
| </div> | |
| <div class="flex items-center space-x-2 mt-1 ml-6"> | |
| <i data-feather="clock" class="w-4 h-4 text-gray-500 dark:text-gray-400"></i> | |
| <span class="text-sm text-gray-500 dark:text-gray-400">Scheduled: 18:05</span> | |
| </div> | |
| </div> | |
| <!-- Status Timeline --> | |
| <div class="border-t border-gray-200 dark:border-gray-700 pt-3"> | |
| <h4 class="text-sm font-medium mb-2 dark:text-gray-300">Journey Progress</h4> | |
| <div class="space-y-2"> | |
| <div class="flex items-start"> | |
| <div class="w-4 h-4 rounded-full bg-green-500 mt-1 mr-2"></div> | |
| <div> | |
| <p class="font-medium dark:text-white">New Delhi (NDLS)</p> | |
| <p class="text-sm text-gray-500 dark:text-gray-400">Departed at 16:30 (5 min late)</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start"> | |
| <div class="w-4 h-4 rounded-full bg-gray-300 dark:bg-gray-600 mt-1 mr-2"></div> | |
| <div> | |
| <p class="font-medium dark:text-white">Mathura Junction (MTJ)</p> | |
| <p class="text-sm text-gray-500 dark:text-gray-400">Expected at 18:05</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start"> | |
| <div class="w-4 h-4 rounded-full bg-gray-300 dark:bg-gray-600 mt-1 mr-2"></div> | |
| <div> | |
| <p class="font-medium dark:text-white">Mumbai Central (MMCT)</p> | |
| <p class="text-sm text-gray-500 dark:text-gray-400">Expected at 09:05 tomorrow</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| </main> | |
| <!-- Enhanced Navigation Rail (Tablet/Desktop) --> | |
| <nav class="hidden md:flex fixed left-0 top-0 h-full w-24 py-6 flex-col items-center bg-white dark:bg-gray-800 border-r border-gray-200 dark:border-gray-700 z-40"> | |
| <div class="mb-10 mt-4"> | |
| <i data-feather="train" class="w-10 h-10 text-primary-light dark:text-accent"></i> | |
| </div> | |
| <div class="flex flex-col items-center space-y-10 w-full"> | |
| <a href="index.html" class="flex flex-col items-center text-gray-500 dark:text-gray-400 w-full py-3 rounded-lg transition-all hover:bg-gray-100 dark:hover:bg-gray-700"> | |
| <i data-feather="home" class="w-7 h-7"></i> | |
| <span class="text-sm mt-1 font-medium">Home</span> | |
| </a> | |
| <a href="book.html" class="flex flex-col items-center text-gray-500 dark:text-gray-400 w-full py-3 rounded-lg transition-all hover:bg-gray-100 dark:hover:bg-gray-700"> | |
| <i data-feather="book-open" class="w-7 h-7"></i> | |
| <span class="text-sm mt-1 font-medium">Bookings</span> | |
| </a> | |
| <a href="status.html" class="flex flex-col items-center text-primary-light dark:text-accent w-full py-3 rounded-lg transition-all hover:bg-gray-100 dark:hover:bg-gray-700"> | |
| <i data-feather="map-pin" class="w-7 h-7"></i> | |
| <span class="text-sm mt-1 font-medium">Status</span> | |
| </a> | |
| <a href="profile.html" class="flex flex-col items-center text-gray-500 dark:text-gray-400 w-full py-3 rounded-lg transition-all hover:bg-gray-100 dark:hover:bg-gray-700"> | |
| <i data-feather="user" class="w-7 h-7"></i> | |
| <span class="text-sm mt-1 font-medium">Profile</span> | |
| </a> | |
| </div> | |
| </nav> | |
| <script> | |
| // Toggle status results | |
| document.getElementById('check-status-btn').addEventListener('click', function() { | |
| document.getElementById('status-results').classList.remove('hidden'); | |
| // Scroll to results | |
| document.getElementById('status-results').scrollIntoView({ behavior: 'smooth' }); | |
| }); | |
| // Refresh button | |
| document.getElementById('refresh-btn').addEventListener('click', function() { | |
| location.reload(); | |
| }); | |
| // Theme toggle | |
| const themeToggle = document.getElementById('theme-toggle'); | |
| const html = document.documentElement; | |
| themeToggle.addEventListener('click', () => { | |
| html.classList.toggle('dark'); | |
| localStorage.theme = html.classList.contains('dark') ? 'dark' : 'light'; | |
| }); | |
| // Check for saved theme preference | |
| if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) { | |
| html.classList.add('dark'); | |
| } else { | |
| html.classList.remove('dark'); | |
| } | |
| // Feather icons | |
| feather.replace(); | |
| </script> | |
| </body> | |
| </html> |