-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
389 lines (351 loc) · 20.9 KB
/
index.html
File metadata and controls
389 lines (351 loc) · 20.9 KB
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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Grami - Know Your City Easily</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<!-- Firebase Cloud SDK [COMPAT V9] -->
<script src="https://www.gstatic.com/firebasejs/9.23.0/firebase-app-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.23.0/firebase-database-compat.js"></script>
<script src="shared.js"></script>
</head>
<body>
<div id="app-viewport">
<!-- Splash Screen -->
<div id="splash-screen" class="screen active" style="background: var(--dark);">
<div class="splash-content" style="display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh;">
<div class="logo-stack-v9">
<i class="fas fa-phone-volume splash-icon-v9"></i>
<h1 class="splash-title-v9">Grami</h1>
</div>
<div class="splash-pill-v9">Know Your City Easily</div>
</div>
<!-- Audio element hidden in splash -->
<audio id="startup-sound" src="https://assets.mixkit.co/active_storage/sfx/2869/2869-preview.mp3" preload="auto"></audio>
</div>
<!-- Login Screen -->
<div id="login-screen" class="screen">
<div class="login-header-v8">
<div class="logo-stack-v8">
<i class="fas fa-phone-volume logo-icon-v8"></i>
<h1 class="logo-text-v8">Grami</h1>
</div>
<div class="branding-swoosh-v8">
<svg viewBox="0 0 1440 320" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg">
<path class="wave-v1" fill="#AEEBBF" d="M0,160 C 480,320 960,0 1440,160 L1440,320 L0,320 Z"></path>
<path class="wave-v2" fill="rgba(39, 161, 112, 0.4)" d="M0,192 C 480,352 960,32 1440,192 L1440,320 L0,320 Z"></path>
<path class="wave-v3" fill="rgba(174, 235, 191, 0.6)" d="M0,224 C 480,384 960,64 1440,224 L1440,320 L0,320 Z"></path>
<path class="wave-v4" fill="#27A170" d="M0,256 C 480,448 960,96 1440,256 L1440,320 L0,320 Z"></path>
</svg>
</div>
</div>
<div class="login-main-card-v8" style="margin-top: 20px;">
<h2 class="login-title-v5" style="margin-bottom: 20px;">Welcome Back</h2>
<form id="login-form">
<div class="form-group">
<label>Username</label>
<div class="input-container">
<i class="fas fa-user"></i>
<input type="text" id="login-username" placeholder="Enter username" required>
</div>
</div>
<div class="form-group">
<label>Password</label>
<div class="input-container">
<i class="fas fa-lock"></i>
<input type="password" id="login-password" placeholder="Enter password" required>
<i class="fas fa-eye toggle-password" style="cursor: pointer; color: var(--gray-400);"></i>
</div>
</div>
<button type="submit" class="btn-primary">Login Now</button>
<p id="login-error" style="color: #e74c3c; font-size: 12px; margin-top: 15px; text-align: center; display: none;">Invalid username or password.</p>
<p style="text-align: center; margin-top: 20px; font-size: 14px;">Don't have an account? <a href="#" id="go-to-register" style="color: var(--primary); font-weight: 700;">Sign Up</a></p>
<div style="margin-top: 25px; padding: 15px; border-radius: 12px; background: rgba(39, 161, 112, 0.05); text-align: center; border: 1px dashed var(--primary);">
<p style="font-size: 13px; font-weight: 700; color: var(--dark); margin-bottom: 8px;">Own an Auto or Bus?</p>
<button type="button" id="go-to-partner-reg" style="background: var(--dark); color: white; border: none; padding: 10px 20px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;">
<i class="fas fa-handshake"></i> Register as Vehicle Partner
</button>
</div>
</form>
<div class="login-footer-v8">
© 2026-2027 Grami. All Rights Reserved.
</div>
</div>
</div>
<!-- Register Screen -->
<div id="register-screen" class="screen">
<div class="login-header-v8">
<div class="logo-stack-v8">
<i class="fas fa-phone-volume logo-icon-v8"></i>
<h1 class="logo-text-v8">Grami</h1>
</div>
<div class="branding-swoosh-v8">
<svg viewBox="0 0 1440 320" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg">
<path class="wave-v1" fill="#AEEBBF" d="M0,160 C 480,320 960,0 1440,160 L1440,320 L0,320 Z"></path>
<path class="wave-v2" fill="rgba(39, 161, 112, 0.4)" d="M0,192 C 480,352 960,32 1440,192 L1440,320 L0,320 Z"></path>
<path class="wave-v3" fill="rgba(174, 235, 191, 0.6)" d="M0,224 C 480,384 960,64 1440,224 L1440,320 L0,320 Z"></path>
<path class="wave-v4" fill="#27A170" d="M0,256 C 480,448 960,96 1440,256 L1440,320 L0,320 Z"></path>
</svg>
</div>
</div>
<div class="login-main-card-v8" style="margin-top: 20px;">
<h2 class="login-title-v5" style="margin-bottom: 20px;">Create Account</h2>
<form id="register-form">
<div class="form-group">
<label>Full Name</label>
<div class="input-container">
<i class="fas fa-id-card"></i>
<input type="text" id="reg-name" placeholder="Enter full name" required>
</div>
</div>
<div class="form-group">
<label>Username</label>
<div class="input-container">
<i class="fas fa-user"></i>
<input type="text" id="reg-username" placeholder="Choose username" required>
</div>
</div>
<div class="form-group">
<label>Password</label>
<div class="input-container">
<i class="fas fa-lock"></i>
<input type="password" id="reg-password" placeholder="Create password" required>
</div>
</div>
<div class="form-group">
<label>Phone Number</label>
<div class="input-container">
<i class="fas fa-phone"></i>
<input type="tel" id="reg-phone" placeholder="Enter phone number" required>
</div>
</div>
<button type="submit" class="btn-primary">Sign Up Now</button>
<p style="text-align: center; margin-top: 20px; font-size: 14px;">Already have an account? <a href="#" id="go-to-login" style="color: var(--primary); font-weight: 700;">Login</a></p>
</form>
</div>
</div>
<!-- Vehicle Partner Registration Screen [NEW] -->
<div id="partner-reg-screen" class="screen">
<div class="login-header-v8">
<div class="logo-stack-v8">
<i class="fas fa-handshake logo-icon-v8"></i>
<h1 class="logo-text-v8">Grami Partner</h1>
</div>
<div class="branding-swoosh-v8">
<svg viewBox="0 0 1440 320" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg">
<path class="wave-v1" fill="#AEEBBF" d="M0,160 C 480,320 960,0 1440,160 L1440,320 L0,320 Z"></path>
<path class="wave-v2" fill="rgba(39, 161, 112, 0.4)" d="M0,192 C 480,352 960,32 1440,192 L1440,320 L0,320 Z"></path>
<path class="wave-v3" fill="rgba(174, 235, 191, 0.6)" d="M0,224 C 480,384 960,64 1440,224 L1440,320 L0,320 Z"></path>
<path class="wave-v4" fill="#27A170" d="M0,256 C 480,448 960,96 1440,256 L1440,320 L0,320 Z"></path>
</svg>
</div>
</div>
<div class="login-main-card-v8" style="margin-top: 0; padding-top: 20px;">
<div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;">
<h2 class="login-title-v5" style="margin: 0;">Vehicle Partner</h2>
<button id="back-to-login-from-partner" style="background: none; border: none; color: var(--gray-400); font-weight: 700; cursor: pointer;">
<i class="fas fa-times"></i>
</button>
</div>
<div style="background: var(--gray-100); border-radius: 12px; padding: 5px; display: flex; margin-bottom: 20px;">
<button id="partner-type-auto" class="partner-type-btn active" style="flex: 1; padding: 10px; border: none; border-radius: 8px; font-weight: 700; cursor: pointer;">Auto Rickshaw</button>
<button id="partner-type-bus" class="partner-type-btn" style="flex: 1; padding: 10px; border: none; border-radius: 8px; font-weight: 700; cursor: pointer;">Bus Operator</button>
</div>
<form id="partner-reg-form">
<input type="hidden" id="partner-id" value="">
<div class="form-group">
<label id="partner-label-name">Driver Name</label>
<div class="input-container">
<i class="fas fa-user-tie"></i>
<input type="text" id="partner-name" placeholder="Enter name" required>
</div>
</div>
<div class="form-group">
<label>Vehicle Plate Number</label>
<div class="input-container">
<i class="fas fa-id-card-alt"></i>
<input type="text" id="partner-vehicle" placeholder="e.g. KA 01 AB 1234" required>
</div>
</div>
<div class="form-group">
<label>Contact Mobile</label>
<div class="input-container">
<i class="fas fa-mobile-alt"></i>
<input type="tel" id="partner-phone" placeholder="Enter mobile number" required>
</div>
</div>
<!-- Auto Specific Fields -->
<div id="partner-auto-fields">
<div class="form-group">
<label>Service Area</label>
<div class="input-container">
<i class="fas fa-map-marked-alt"></i>
<input type="text" id="partner-area" placeholder="e.g. Nagarbhavi, Indiranagar">
</div>
</div>
</div>
<!-- Bus Specific Fields -->
<div id="partner-bus-fields" style="display: none;">
<div style="background: #fdfdfd; border: 1px solid var(--gray-200); border-radius: 12px; padding: 15px; margin-bottom: 20px;">
<label style="font-size: 13px; font-weight: 800; color: var(--dark); display: block; margin-bottom: 12px; border-bottom: 1px dashed var(--gray-200); padding-bottom: 8px;">Route Timetable</label>
<div id="bus-route-list">
<!-- Dynamic List of Stops -->
</div>
<button type="button" id="add-route-stop-btn" style="width: 100%; margin-top: 10px; padding: 8px; border: 2px dashed var(--primary); background: none; color: var(--primary); border-radius: 8px; font-weight: 700; cursor: pointer;">
<i class="fas fa-plus"></i> Add Next Stop
</button>
</div>
</div>
<p id="partner-reg-info" style="font-size: 11px; color: var(--gray-400); margin-bottom: 15px; text-align: center;">
Entering an existing Vehicle Number will allow you to update details.
</p>
<button type="submit" class="btn-primary" id="partner-submit-btn">Register as Partner</button>
</form>
</div>
</div>
<div id="home-dashboard" class="screen">
<div class="dashboard-header-v9 vertical-v10">
<div class="top-nav-v9">
<div class="top-nav-left"></div>
<div class="logo-stack-v9-centered">
<i class="fas fa-phone-volume"></i>
<h1>Grami</h1>
</div>
<div class="user-profile-v9" id="user-profile-icon">
<i class="fas fa-user-circle"></i>
<div class="user-dropdown-v9" id="user-dropdown-menu">
<div class="dropdown-header dashboard-user-greeting-v11">Guest</div>
<div class="dropdown-item logout" id="btn-logout-dropdown">
<i class="fas fa-sign-out-alt"></i> Logout
</div>
</div>
</div>
</div>
<div class="header-content-v9" id="dashboard-tools-container">
<h2 id="dashboard-user-greeting-final" class="dashboard-user-greeting-v11">Hello, Guest</h2>
<div class="green-loc-bar-v5" id="loc-bar-v4">
<div class="loc-bar-inner">
<i class="fas fa-map-marker-alt"></i>
<span id="loc-text-v4">Nagarbhavi, Bengaluru</span>
</div>
<i class="fas fa-edit edit-icon"></i>
</div>
<div class="search-pill-v5" id="dashboard-search-container">
<i class="fas fa-search"></i>
<input type="text" placeholder="Search services..." id="dashboard-search-v9">
<i class="fas fa-chevron-right chevron-icon"></i>
</div>
</div>
</div>
<div class="services-grid-v2">
<div class="service-card" id="nav-book-auto-v2">
<div class="service-img" style="background: #FFF9C4;">
<img src="auto_icon.png" alt="Auto">
</div>
<span>Book Auto</span>
</div>
<div class="service-card" id="nav-find-bus-v2">
<div class="service-img" style="background: #E8F5E9;">
<img src="bus_icon.png" alt="Bus">
</div>
<span>Find Bus</span>
</div>
<div class="service-card" onclick="showToast('Coming soon..')">
<div class="service-img" style="background: #E3F2FD;">
<img src="food_icon.png" alt="Food">
</div>
<span>Order Food</span>
</div>
<div class="service-card" onclick="showToast('Coming soon..')">
<div class="service-img" style="background: #FCE4EC;">
<img src="veg_icon.png" alt="Vegetables">
</div>
<span>Vegetables</span>
</div>
</div>
<!-- Redundant old search and services removed -->
<div class="section-title">
<h3 style="font-size: 16px; font-weight: 800; color: var(--dark);">Popular Services</h3>
<a href="#" style="color: var(--gray-600); font-size: 13px; font-weight: 700; text-decoration: underline;">View All</a>
</div>
<div class="popular-list" id="dashboard-popular-list">
<!-- Dynamically Populated -->
</div>
<!-- Bottom Nav Bar -->
<div class="bottom-nav">
<div class="nav-btn active" id="home-nav"><i class="fas fa-home"></i><span>Home</span></div>
<div class="nav-btn" id="history-nav"><i class="fas fa-history"></i><span>History</span></div>
</div>
</div>
<div id="booking-screen" class="screen">
<div class="booking-header-v2">
<i class="fas fa-arrow-left nav-back"></i>
<h2 id="booking-title-v2">Book Auto</h2>
<div id="real-time-clock-v2" class="real-time-clock-v2">00:00:00</div>
</div>
<div id="upcoming-alert-container-v2" class="upcoming-alert-container-v2"></div>
<div id="map-container" style="height: 250px; width: 100%; position: relative;">
<!-- Map will be here -->
</div>
<!-- AUTO SEARCH FILTERS -->
<div class="booking-filters-card" id="auto-filters-v2">
<div class="filter-group">
<label>Select State</label>
<select id="state-select-v2"></select>
</div>
<div class="filter-group">
<label>Select District</label>
<select id="district-select-v2"></select>
</div>
<div class="filter-group">
<label>Select Area</label>
<select id="area-select-v2"></select>
</div>
<button class="btn-search-v2" id="search-action-v2">Search</button>
</div>
<!-- BUS SEARCH FILTERS (Mockup Style) -->
<div class="bus-search-card" id="bus-filters-v2" style="display: none;">
<div class="bus-grid">
<div class="filter-group">
<label>From</label>
<input type="text" id="bus-from-v2" placeholder="Departure">
</div>
<div class="filter-group">
<label>To</label>
<input type="text" id="bus-to-v2" placeholder="Destination">
</div>
</div>
<div class="filter-group" style="margin-top: 10px;">
<label>Bus Number</label>
<input type="text" id="bus-number-search-v2" placeholder="e.g. KA 01 1234">
</div>
<button class="btn-search-v2" style="background: var(--dark); margin-top: 15px;" id="bus-search-action-v2">Search Buses</button>
</div>
<!-- RESULTS LIST -->
<div class="popular-list" id="search-results-list" style="flex-grow: 1; overflow-y: auto; padding-bottom: 20px; width: 100%;">
<!-- Dynamically Populated for Auto -->
</div>
<div id="bus-results-tbody" style="display: none; padding-bottom: 30px;">
<!-- Dynamically Populated for Bus Cards -->
</div>
</div>
<!-- Admin Dashboard Screen Removed - Moved to admin.html -->
<!-- Ride History Screen -->
<div id="history-screen" class="screen">
<div class="booking-header">
<i class="fas fa-arrow-left nav-back" style="cursor: pointer; padding: 10px;"></i>
<h2>Ride History</h2>
</div>
<div class="popular-list" id="user-history-list" style="flex-grow: 1; overflow-y: auto; padding: 20px;">
<!-- Dynamically Populated -->
</div>
</div>
<div id="toast-container" class="toast-container"></div>
</div>
<script src="app.js"></script>
</body>
</html>