-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
442 lines (393 loc) · 20 KB
/
Copy pathindex.html
File metadata and controls
442 lines (393 loc) · 20 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
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Surron Parts & Gear - Premium Electric Bike Components</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="bg">
<!-- Navigation Bar -->
<nav class="navbar" id="navbar">
<div class="navbar-container">
<div class="glass-surface navbar-glass">
<div class="navbar-content">
<a href="#home" class="navbar-logo">
<span class="logo-icon"></span>
<span class="logo-text">ALT-F4</span>
</a>
<div class="navbar-menu" id="navbarMenu">
<a href="#home" class="nav-link">Home</a>
<a href="#products" class="nav-link">Products</a>
<a href="#cart" class="nav-link cart-link">
Cart
<span class="cart-badge" id="cartBadge">0</span>
</a>
<a href="#orders" class="nav-link" id="ordersLink" style="display: none;">My Orders</a>
<a href="#login" class="nav-link" id="loginLink">Login</a>
<a href="#register" class="nav-link register-link" id="registerLink">Register</a>
<span class="nav-user" id="userGreeting" style="display: none;"></span>
<a href="#admin" class="nav-link" id="adminLink" style="display: none;">Admin</a>
<button class="nav-link logout-btn" id="logoutBtn" style="display: none;">Logout</button>
</div>
<button class="navbar-toggle" id="navbarToggle" aria-label="Toggle menu">
<span class="hamburger"></span>
</button>
</div>
</div>
</div>
</nav>
<!-- Home Page -->
<section id="home" class="page-section home-page">
<div class="container">
<div class="hero-section">
<div class="glass-surface hero-glass">
<div class="hero-content">
<span class="hero-icon"></span>
<h1 class="hero-title">SURRON PARTS & GEAR</h1>
<p class="hero-subtitle">Premium Quality Parts for Your Electric Adventure</p>
<p class="hero-description">
Discover high-performance components, accessories, and upgrades
for your Surron Light Bee. From controllers to suspension,
we've got everything you need.
</p>
<div class="hero-buttons">
<a href="#products" class="btn btn-primary">Shop Now</a>
<a href="#products" class="btn btn-secondary">View Catalog</a>
</div>
</div>
</div>
</div>
<div class="features-section">
<h2 class="section-title">Why Choose Us</h2>
<div class="features-grid">
<div class="glass-surface feature-card">
<div class="feature-content">
<div class="feature-icon"></div>
<h3>Quality Parts</h3>
<p>Premium components from trusted manufacturers</p>
</div>
</div>
<div class="glass-surface feature-card">
<div class="feature-content">
<div class="feature-icon"></div>
<h3>Fast Shipping</h3>
<p>Quick delivery to get you back on the trail</p>
</div>
</div>
<div class="glass-surface feature-card">
<div class="feature-content">
<div class="feature-icon"></div>
<h3>Expert Support</h3>
<p>Knowledgeable team ready to help</p>
</div>
</div>
<div class="glass-surface feature-card">
<div class="feature-content">
<div class="feature-icon"></div>
<h3>Warranty</h3>
<p>All products backed by manufacturer warranty</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Products Page -->
<section id="products" class="page-section products-page" style="display: none;">
<div class="container">
<h1 class="page-title">Our Products</h1>
<div class="products-controls">
<div class="glass-surface search-bar-glass">
<input type="text" id="searchInput" class="search-input" placeholder="Search products...">
</div>
<div class="category-filters" id="categoryFilters">
<!-- Categories will be inserted here by JavaScript -->
</div>
</div>
<div class="products-grid" id="productsGrid">
<!-- Products will be inserted here by JavaScript -->
</div>
</div>
</section>
<!-- Product Detail Modal -->
<div id="productModal" class="modal">
<div class="modal-content glass-surface">
<span class="close-modal">×</span>
<div id="productDetailContent">
<!-- Product details will be inserted here -->
</div>
</div>
</div>
<!-- Checkout Modal -->
<div id="checkoutModal" class="modal">
<div class="modal-content glass-surface checkout-modal-content">
<span class="close-modal">×</span>
<div id="checkoutContent">
<h2>Complete Your Order</h2>
<div class="checkout-section">
<h3>Order Summary</h3>
<div id="checkoutSummary"></div>
</div>
<div class="checkout-section">
<h3>Select Payment Method</h3>
<div class="payment-methods">
<div class="payment-option glass-surface" data-method="card">
<input type="radio" name="paymentMethod" id="cardPayment" value="card" checked>
<label for="cardPayment">
<span class="payment-icon">💳</span>
<div class="payment-info">
<strong>Credit/Debit Card</strong>
<small>Visa, Mastercard, AmEx</small>
</div>
</label>
</div>
<div class="payment-option glass-surface" data-method="paypal">
<input type="radio" name="paymentMethod" id="paypalPayment" value="paypal">
<label for="paypalPayment">
<span class="payment-icon">💰</span>
<div class="payment-info">
<strong>PayPal</strong>
<small>Pay with your PayPal account</small>
</div>
</label>
</div>
<div class="payment-option glass-surface" data-method="crypto">
<input type="radio" name="paymentMethod" id="cryptoPayment" value="crypto">
<label for="cryptoPayment">
<span class="payment-icon">₿</span>
<div class="payment-info">
<strong>Cryptocurrency</strong>
<small>Bitcoin, Ethereum, USDT</small>
</div>
</label>
</div>
<div class="payment-option glass-surface" data-method="bank">
<input type="radio" name="paymentMethod" id="bankPayment" value="bank">
<label for="bankPayment">
<span class="payment-icon">🏦</span>
<div class="payment-info">
<strong>Bank Transfer</strong>
<small>Direct bank transfer</small>
</div>
</label>
</div>
<div class="payment-option glass-surface" data-method="cod">
<input type="radio" name="paymentMethod" id="codPayment" value="cod">
<label for="codPayment">
<span class="payment-icon">💵</span>
<div class="payment-info">
<strong>Cash on Delivery</strong>
<small>Pay when you receive</small>
</div>
</label>
</div>
</div>
</div>
<div class="checkout-section" id="paymentDetailsSection">
<!-- Payment details form will be inserted here based on selected method -->
</div>
<div class="checkout-actions">
<button class="btn btn-secondary" id="cancelCheckout">Cancel</button>
<button class="btn btn-primary" id="confirmOrder">Place Order</button>
</div>
</div>
</div>
</div>
<!-- Cart Page -->
<section id="cart" class="page-section cart-page" style="display: none;">
<div class="container">
<h1 class="page-title">Shopping Cart</h1>
<div id="cartContent">
<!-- Cart content will be inserted here by JavaScript -->
</div>
</div>
</section>
<!-- Login Page -->
<section id="login" class="page-section auth-page" style="display: none;">
<div class="container">
<div class="auth-container">
<div class="glass-surface auth-glass">
<div class="auth-content">
<h1 class="auth-title">Welcome Back</h1>
<p class="auth-subtitle">Login to your account</p>
<div id="loginError" class="error-message" style="display: none;"></div>
<form id="loginForm" class="auth-form">
<div class="form-group">
<label for="loginUsername">Username</label>
<input type="text" id="loginUsername" name="username" required>
</div>
<div class="form-group">
<label for="loginPassword">Password</label>
<input type="password" id="loginPassword" name="password" required>
</div>
<button type="submit" class="btn btn-primary auth-submit-btn">Login</button>
</form>
<div class="auth-footer">
<p>Don't have an account? <a href="#register">Register here</a></p>
<p class="demo-credentials">
<small>Demo Admin: username: <strong>gank</strong>, password: <strong>Gank2024!</strong></small>
</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Register Page -->
<section id="register" class="page-section auth-page" style="display: none;">
<div class="container">
<div class="auth-container">
<div class="glass-surface auth-glass">
<div class="auth-content">
<h1 class="auth-title">Create Account</h1>
<p class="auth-subtitle">Join the Surron community</p>
<div id="registerError" class="error-message" style="display: none;"></div>
<form id="registerForm" class="auth-form">
<div class="form-group">
<label for="registerUsername">Username</label>
<input type="text" id="registerUsername" name="username" required>
</div>
<div class="form-group">
<label for="registerEmail">Email</label>
<input type="email" id="registerEmail" name="email" required>
</div>
<div class="form-group">
<label for="registerPassword">Password</label>
<input type="password" id="registerPassword" name="password" required minlength="6">
</div>
<div class="form-group">
<label for="registerConfirmPassword">Confirm Password</label>
<input type="password" id="registerConfirmPassword" name="confirmPassword" required>
</div>
<button type="submit" class="btn btn-primary auth-submit-btn">Register</button>
</form>
<div class="auth-footer">
<p>Already have an account? <a href="#login">Login here</a></p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Admin Dashboard -->
<section id="admin" class="page-section admin-page" style="display: none;">
<div class="container">
<div class="admin-header">
<h1 class="page-title">Admin Dashboard</h1>
</div>
<!-- Dashboard Statistics -->
<div class="admin-stats">
<div class="glass-surface stat-card">
<div class="stat-icon">📦</div>
<div class="stat-info">
<h3 id="productCount">0</h3>
<p>Total Products</p>
</div>
</div>
<div class="glass-surface stat-card">
<div class="stat-icon">🛒</div>
<div class="stat-info">
<h3 id="totalOrders">0</h3>
<p>Total Orders</p>
</div>
</div>
<div class="glass-surface stat-card">
<div class="stat-icon">💰</div>
<div class="stat-info">
<h3 id="totalRevenue">$0</h3>
<p>Total Revenue</p>
</div>
</div>
<div class="glass-surface stat-card">
<div class="stat-icon">⏳</div>
<div class="stat-info">
<h3 id="pendingOrders">0</h3>
<p>Pending Orders</p>
</div>
</div>
</div>
<!-- Products Management Section -->
<div class="admin-section">
<div class="section-header">
<h2 class="section-title">Products Management</h2>
<button class="btn btn-primary" id="toggleAddProduct">+ Add Product</button>
</div>
<div id="addProductForm" class="glass-surface admin-form-glass" style="display: none;">
<form id="productForm" class="admin-form">
<h2 id="formTitle">Add New Product</h2>
<input type="hidden" id="editProductId">
<div class="form-row">
<div class="form-group">
<label for="productName">Product Name</label>
<input type="text" id="productName" name="name" required>
</div>
<div class="form-group">
<label for="productCategory">Category</label>
<select id="productCategory" name="category" required>
<option value="">Select Category</option>
<option value="Electronics">Electronics</option>
<option value="Battery">Battery</option>
<option value="Suspension">Suspension</option>
<option value="Brakes">Brakes</option>
<option value="Wheels">Wheels</option>
<option value="Accessories">Accessories</option>
</select>
</div>
</div>
<div class="form-row">
<div class="form-group">
<label for="productPrice">Price ($)</label>
<input type="number" id="productPrice" name="price" step="0.01" min="0" required>
</div>
<div class="form-group">
<label for="productStock">Stock</label>
<input type="number" id="productStock" name="stock" min="0" required>
</div>
</div>
<div class="form-group">
<label for="productImage">Image URL</label>
<input type="url" id="productImage" name="image" required>
</div>
<div class="form-group">
<label for="productDescription">Description</label>
<textarea id="productDescription" name="description" required></textarea>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary" id="submitProductBtn">Add Product</button>
<button type="button" class="btn btn-secondary" id="cancelProductBtn">Cancel</button>
</div>
</form>
</div>
<div class="products-table-section">
<div class="products-table-container" id="adminProductsList">
<!-- Admin products list will be inserted here -->
</div>
</div>
</div>
<!-- Orders Management Section -->
<div class="admin-section">
<div class="section-header">
<h2 class="section-title">Orders Management</h2>
</div>
<div class="orders-table-container" id="adminOrdersList">
<!-- Admin orders list will be inserted here -->
</div>
</div>
</div>
</section>
<!-- User Orders Page -->
<section id="orders" class="page-section orders-page" style="display: none;">
<div class="container">
<h1 class="page-title">My Orders</h1>
<div id="ordersContent">
<!-- Orders will be inserted here by JavaScript -->
</div>
</div>
</section>
<script src="database.js"></script>
<script src="app.js"></script>
</div>
</body>
</html>