Spaces:
Running
Running
File size: 18,866 Bytes
95b951f 608ef78 95b951f 608ef78 95b951f 608ef78 95b951f 608ef78 95b951f 608ef78 95b951f 608ef78 95b951f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | <!DOCTYPE html>
<html lang="en" class="light">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Profile | 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);
}
.tab-active {
border-bottom: 2px solid #3949AB;
color: #3949AB;
}
.dark .tab-active {
border-bottom-color: #FFCA28;
color: #FFCA28;
}
</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">My Profile</h1>
</div>
<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>
</header>
<!-- Main Content -->
<main class="max-w-6xl mx-auto px-4 py-6">
<!-- Profile Header -->
<section class="material-card bg-white dark:bg-gray-800 p-6 mb-6">
<div class="flex flex-col items-center text-center mb-6">
<div class="w-24 h-24 rounded-full bg-gray-200 dark:bg-gray-700 mb-4 overflow-hidden">
<img src="http://static.photos/people/200x200/123" alt="Profile" class="w-full h-full object-cover">
</div>
<h2 class="text-xl font-bold dark:text-white">John Doe</h2>
<p class="text-gray-500 dark:text-gray-400">john.doe@example.com</p>
<p class="text-gray-500 dark:text-gray-400">+91 9876543210</p>
</div>
<div class="flex justify-center space-x-4">
<button class="flex flex-col items-center p-3 rounded-material hover:bg-gray-100 dark:hover:bg-gray-700">
<i data-feather="edit" class="w-5 h-5 text-primary-light dark:text-accent"></i>
<span class="text-xs mt-1 dark:text-gray-300">Edit Profile</span>
</button>
<button class="flex flex-col items-center p-3 rounded-material hover:bg-gray-100 dark:hover:bg-gray-700">
<i data-feather="settings" class="w-5 h-5 text-primary-light dark:text-accent"></i>
<span class="text-xs mt-1 dark:text-gray-300">Settings</span>
</button>
<button class="flex flex-col items-center p-3 rounded-material hover:bg-gray-100 dark:hover:bg-gray-700">
<i data-feather="log-out" class="w-5 h-5 text-primary-light dark:text-accent"></i>
<span class="text-xs mt-1 dark:text-gray-300">Logout</span>
</button>
</div>
</section>
<!-- Tabs -->
<div class="flex border-b border-gray-200 dark:border-gray-700 mb-6">
<button id="bookings-tab" class="tab-active pb-2 px-4 font-medium dark:text-white">My Bookings</button>
<button id="wallet-tab" class="pb-2 px-4 font-medium text-gray-500 dark:text-gray-400">Wallet</button>
<button id="preferences-tab" class="pb-2 px-4 font-medium text-gray-500 dark:text-gray-400">Preferences</button>
</div>
<!-- Bookings Tab Content -->
<div id="bookings-content">
<div class="material-card bg-white dark:bg-gray-800 p-4 mb-4">
<div class="flex justify-between items-center mb-2">
<div>
<h3 class="font-medium dark:text-white">Delhi to Mumbai</h3>
<p class="text-sm text-gray-500 dark:text-gray-400">Rajdhani Express (12952)</p>
</div>
<span class="chip bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200">Confirmed</span>
</div>
<div class="flex justify-between items-center mt-4">
<div>
<p class="text-sm text-gray-500 dark:text-gray-400">Departure</p>
<p class="font-medium dark:text-white">15 Aug, 16:25</p>
</div>
<div class="flex flex-col items-center">
<div class="w-16 h-px bg-gray-300 dark:bg-gray-600"></div>
<p class="text-xs text-gray-500 dark:text-gray-400 mt-1">16h 35m</p>
</div>
<div>
<p class="text-sm text-gray-500 dark:text-gray-400">Arrival</p>
<p class="font-medium dark:text-white">16 Aug, 09:00</p>
</div>
</div>
<div class="flex justify-between items-center mt-4">
<div class="flex space-x-2">
<span class="chip bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200">A1: 12,14,16</span>
<span class="chip bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200">3A</span>
</div>
<button class="text-primary-light dark:text-accent font-medium">View Details</button>
</div>
</div>
<div class="material-card bg-white dark:bg-gray-800 p-4">
<div class="flex justify-between items-center mb-2">
<div>
<h3 class="font-medium dark:text-white">Bangalore to Chennai</h3>
<p class="text-sm text-gray-500 dark:text-gray-400">Shatabdi Express (12028)</p>
</div>
<span class="chip bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200">Pending</span>
</div>
<div class="flex justify-between items-center mt-4">
<div>
<p class="text-sm text-gray-500 dark:text-gray-400">Departure</p>
<p class="font-medium dark:text-white">20 Aug, 06:00</p>
</div>
<div class="flex flex-col items-center">
<div class="w-16 h-px bg-gray-300 dark:bg-gray-600"></div>
<p class="text-xs text-gray-500 dark:text-gray-400 mt-1">5h 15m</p>
</div>
<div>
<p class="text-sm text-gray-500 dark:text-gray-400">Arrival</p>
<p class="font-medium dark:text-white">20 Aug, 11:15</p>
</div>
</div>
<div class="flex justify-between items-center mt-4">
<div class="flex space-x-2">
<span class="chip bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200">C3: 23,24</span>
<span class="chip bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200">CC</span>
</div>
<button class="text-primary-light dark:text-accent font-medium">View Details</button>
</div>
</div>
</div>
<!-- Wallet Tab Content -->
<div id="wallet-content" class="hidden">
<div class="material-card bg-white dark:bg-gray-800 p-6 text-center">
<div class="w-16 h-16 mx-auto bg-blue-100 dark:bg-blue-900 rounded-full flex items-center justify-center mb-4">
<i data-feather="credit-card" class="w-8 h-8 text-blue-500 dark:text-blue-400"></i>
</div>
<h3 class="text-lg font-bold mb-1 dark:text-white">RailRush Wallet</h3>
<p class="text-gray-500 dark:text-gray-400 mb-6">Balance: ₹1,250.00</p>
<div class="grid grid-cols-2 gap-4 mb-6">
<button class="bg-blue-50 dark:bg-blue-900 text-blue-600 dark:text-blue-400 py-2 px-4 rounded-material font-medium">
Add Money
</button>
<button class="bg-green-50 dark:bg-green-900 text-green-600 dark:text-green-400 py-2 px-4 rounded-material font-medium">
Withdraw
</button>
</div>
<div class="text-left">
<h4 class="font-medium mb-2 dark:text-white">Recent Transactions</h4>
<div class="space-y-3">
<div class="flex justify-between items-center">
<div>
<p class="font-medium dark:text-white">Ticket Booking</p>
<p class="text-sm text-gray-500 dark:text-gray-400">15 Aug, 10:20 AM</p>
</div>
<p class="text-red-500 dark:text-red-400">- ₹1,850.00</p>
</div>
<div class="flex justify-between items-center">
<div>
<p class="font-medium dark:text-white">Wallet Top-up</p>
<p class="text-sm text-gray-500 dark:text-gray-400">14 Aug, 04:15 PM</p>
</div>
<p class="text-green-500 dark:text-green-400">+ ₹3,000.00</p>
</div>
<div class="flex justify-between items-center">
<div>
<p class="font-medium dark:text-white">Ticket Cancellation</p>
<p class="text-sm text-gray-500 dark:text-gray-400">10 Aug, 11:30 AM</p>
</div>
<p class="text-green-500 dark:text-green-400">+ ₹1,250.00</p>
</div>
</div>
</div>
</div>
</div>
<!-- Preferences Tab Content -->
<div id="preferences-content" class="hidden">
<div class="material-card bg-white dark:bg-gray-800 p-6">
<h3 class="text-lg font-bold mb-4 dark:text-white">Travel Preferences</h3>
<div class="space-y-4">
<div>
<label class="block text-sm font-medium mb-1 dark:text-gray-300">Preferred Class</label>
<select class="w-full p-3 border rounded-material bg-gray-50 dark:bg-gray-700 dark:border-gray-600 dark:text-white">
<option>AC 3 Tier (3A)</option>
<option>AC 2 Tier (2A)</option>
<option>AC First Class (1A)</option>
<option>Sleeper (SL)</option>
<option>Second Sitting (2S)</option>
</select>
</div>
<div>
<label class="block text-sm font-medium mb-1 dark:text-gray-300">Berth Preference</label>
<select class="w-full p-3 border rounded-material bg-gray-50 dark:bg-gray-700 dark:border-gray-600 dark:text-white">
<option>No Preference</option>
<option>Lower</option>
<option>Middle</option>
<option>Upper</option>
</select>
</div>
<div>
<label class="block text-sm font-medium mb-1 dark:text-gray-300">Food Preference</label>
<select class="w-full p-3 border rounded-material bg-gray-50 dark:bg-gray-700 dark:border-gray-600 dark:text-white">
<option>Vegetarian</option>
<option>Non-Vegetarian</option>
<option>Jain</option>
<option>No Preference</option>
</select>
</div>
<div class="flex items-center justify-between">
<label class="block text-sm font-medium dark:text-gray-300">Receive SMS Notifications</label>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer" checked>
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-primary-light dark:peer-checked:bg-accent"></div>
</label>
</div>
<div class="flex items-center justify-between">
<label class="block text-sm font-medium dark:text-gray-300">Receive Email Notifications</label>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer" checked>
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-primary-light dark:peer-checked:bg-accent"></div>
</label>
</div>
</div>
<button class="w-full mt-6 bg-primary-light dark:bg-accent text-white py-3 px-6 rounded-material font-medium hover:bg-opacity-90 transition">
Save Preferences
</button>
</div>
</div>
</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-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="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-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="user" class="w-7 h-7"></i>
<span class="text-sm mt-1 font-medium">Profile</span>
</a>
</div>
</nav>
<script>
// Tab switching
const bookingsTab = document.getElementById('bookings-tab');
const walletTab = document.getElementById('wallet-tab');
const preferencesTab = document.getElementById('preferences-tab');
const bookingsContent = document.getElementById('bookings-content');
const walletContent = document.getElementById('wallet-content');
const preferencesContent = document.getElementById('preferences-content');
bookingsTab.addEventListener('click', () => {
resetTabs();
bookingsTab.classList.add('tab-active');
bookingsContent.classList.remove('hidden');
});
walletTab.addEventListener('click', () => {
resetTabs();
walletTab.classList.add('tab-active');
walletContent.classList.remove('hidden');
});
preferencesTab.addEventListener('click', () => {
resetTabs();
preferencesTab.classList.add('tab-active');
preferencesContent.classList.remove('hidden');
});
function resetTabs() {
[bookingsTab, walletTab, preferencesTab].forEach(tab => {
tab.classList.remove('tab-active');
tab.classList.add('text-gray-500', 'dark:text-gray-400');
});
[bookingsContent, walletContent, preferencesContent].forEach(content => {
content.classList.add('hidden');
});
}
// 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> |