-
Notifications
You must be signed in to change notification settings - Fork 0
/
helmet.html
336 lines (303 loc) · 11.5 KB
/
helmet.html
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">
<head>
<!-- Head content -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Helmet</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="css/bootstrap.min.css"/>
<script src="js/jquery2.js"></script>
<script src="js/bootstrap.min.js"></script>
<link rel="stylesheet" href="path/to/bootstrap.min.css">
<script src="path/to/bootstrap.bundle.min.js"></script>
</head>
<body>
<!-- Navigation -->
<header class="navbar navbar-expand-lg navbar-light bg-light sticky-navbar" style=" position: sticky;
top: 0;
z-index: 1000;">
<div class="container">
<a class="navbar-brand" href="index.html">Bike Store</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="index.html">Home</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown"
aria-expanded="false">
Products
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="bikes.html">Bikes</a></li>
<li><a class="dropdown-item" href="accessories.html">Accessories</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="about.html">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.html">Contact Us</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" data-bs-toggle="modal" data-bs-target="#cartModal">
<i class="fas fa-shopping-cart"></i>
Cart
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="login.html">
<i class="fas fa-user"></i>
Login
</a>
</li>
</ul>
</div>
<form class="d-flex">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-primary" type="submit">
<i class="fas fa-search"></i>
</button>
</form>
</div>
</header>
<!-- Navigation content -->
<!-- Main content -->
<section class="shop container">
<h2 class="section-title">HELMET</h2>
<div class="row shop-content">
<div class="col-lg-3 col-md-6 col-sm-12">
<div class="product-box">
<div class="product-image">
<img src="images/gravel-YQB51IZD.jpg" alt="" class="product-img">
<div class="overlay">
<a href="#" onclick="addToCart(event, 'gravel1')" class="btn btn-primary btn-buy">
<i class="fas fa-shopping-cart"></i> Add to Cart
</a>
</div>
</div>
<div class="product-details">
<h2 class="product-title">BIANCHI ZOLDER PRO BIKE</h2>
<span class="price">₱193,800.00</span>
<div class="specs">
<h3>Specifications:</h3>
<ul>
<li>Color:
ZD - CK16/Purple Rainbow</li>
<li>Frame Size: 48cm</li>
<li> SKU: 10124473</li>
</ul>
</div>
<div class="ratings" style="color: yellow; font-size: 30px;">
<span class="star">★</span>
<span class="star">★</span>
<span class="star">★</span>
<span class="star">★</span>
<span class="star">★</span>
</div>
</div>
</div><br>
</div>
<div class="col-lg-3 col-md-6 col-sm-12">
<div class="product-box">
<div class="product-image">
<img src="images/gravel-flt_fx_adv_grx6_b_0-whtxptn_1.jpg" alt="" class="product-img">
<div class="overlay">
<a href="#" onclick="addToCart(event, 'gravel2')" class="btn btn-primary btn-buy">
<i class="fas fa-shopping-cart"></i> Add to Cart
</a>
</div>
</div>
<div class="product-details">
<h2 class="product-title">FELT FX ADVANCED GRX 600 BIKE</h2>
<span class="price">₱163,149.00</span>
<div class="specs">
<h3>Specifications:</h3>
<ul>
<li>Color:
White / TeXtreme (Pattern)</li>
<li>Frame Size: 57cm</li>
<li>SKU: 10113923</li>
</ul>
</div>
<div class="ratings" style="color: yellow; font-size: 30px;">
<span class="star">★</span>
<span class="star">★</span>
<span class="star">★</span>
<span class="star">★</span>
</div>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-12">
<div class="product-box">
<div class="product-image">
<img src="images/gravel3flt_fx_advp_fc_cx1_b_0-stnqfrshtxptn_1.jpg" alt="" class="product-img">
<div class="overlay">
<a href="#" onclick="addToCart(event, 'gravel3')" class="btn btn-primary btn-buy">
<i class="fas fa-shopping-cart"></i> Add to Cart
</a>
</div>
</div>
<div class="product-details">
<h2 class="product-title">FELT FX ADVANCED+ FORCE CX1 BIKE</h2>
<span class="price">₱230,251.00</span>
<div class="specs">
<h3>Specifications:</h3>
<ul>
<li>Color:
Satin Aquafresh / Textreme (Pattern)</li>
<li>Frame Size:
47cm</li>
<li>SKU: 10113999</li>
</ul>
</div>
<div class="ratings" style="color: yellow; font-size: 30px;">
<span class="star">★</span>
<span class="star">★</span>
<span class="star">★</span>
<span class="star">★</span>
<span class="star">★</span>
</div>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-12">
<div class="product-box">
<div class="product-image">
<img src="images/gravel4COLNAGO-G3X-G3BK.jpg" alt="" class="product-img">
<div class="overlay">
<a href="#" onclick="addToCart(event, 'gravel4')" class="btn btn-primary btn-buy">
<i class="fas fa-shopping-cart"></i> Add to Cart
</a>
</div>
</div>
<div class="product-details">
<h2 class="product-title">COLNAGO G3-X RIVAL AXS 1X DISC BIKE </h2>
<span class="price">₱247,347,45</span>
<div class="specs">
<h3>Specifications:</h3>
<ul>
<li>Color:
G3BK</li>
<li>Frame Size:
46cm</li>
<li> SKU: 10140512</li>
</ul>
</div>
<div class="ratings" style="color: yellow; font-size: 30px;">
<span class="star">★</span>
<span class="star">★</span>
</div>
</div>
</div>
<br>
</div>
</div>
</section>
<div class="modal fade" id="cartModal" tabindex="-1" role="dialog" aria-labelledby="cartModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="cartModalLabel">Cart</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div id="cartContent">
<p id="emptyCartMessage" class="text-center">Your cart is empty.</p>
</div>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-md-4">
<h5>Quick Links</h5>
<ul class="list-unstyled">
<li><a href="#">Home</a></li>
<li><a href="#">Bikes</a></li>
<li><a href="#">Accessories</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</div>
<div class="col-md-4">
<h5>Connect With Us</h5>
<ul class="list-unstyled">
<li><a href="#"><i class="fab fa-facebook"></i> Facebook</a></li>
<li><a href="#"><i class="fab fa-twitter"></i> Twitter</a></li>
<li><a href="#"><i class="fab fa-instagram"></i> Instagram</a></li>
<li><a href="#"><i class="fab fa-linkedin"></i> LinkedIn</a></li>
</ul>
</div>
<div class="col-md-4">
<h5>Contact Info</h5>
<ul class="list-unstyled">
<li><i class="fas fa-phone"></i> +1 123-456-7890</li>
<li><i class="fas fa-envelope"></i> info@bikestore.com</li>
<li><i class="fas fa-map-marker-alt"></i> Philippines</li>
</ul>
</div>
</div>
</div>
<div class="text-center">
© 2023 Bike Store. All rights reserved.<br>
<a href="privacy.html">Privacy Policy</a> | <a href="terms.html">Terms of Service</a> | <a href="contact.html">Contact Us</a>
</div>
</footer>
<!-- Footer content -->
<!-- JavaScript functions -->
<!-- JavaScript -->
<script>
// Retrieve stored cart items from local storage, or initialize an empty array
let cartItems = JSON.parse(localStorage.getItem('cartItems')) || [];
// Function to handle adding items to the cart
function addToCart(event, productId) {
event.preventDefault();
// Check if the product is already in the cart
const existingItem = cartItems.find(item => item.id === productId);
if (existingItem) {
// If the product is already in the cart, increase the quantity
existingItem.quantity++;
} else {
// If the product is not in the cart, add it as a new item
const newItem = {
id: productId,
quantity: 1
};
cartItems.push(newItem);
}
// Store the updated cart items in local storage
localStorage.setItem('cartItems', JSON.stringify(cartItems));
// Optional: Show a success message or perform any other desired actions
alert('Item added to cart!');
// Update the cart badge
updateCartBadge();
}
// Function to display the number of items in the cart
function updateCartBadge() {
const cartBadge = document.getElementById('cartBadge');
cartBadge.textContent = cartItems.length;
}
// Call the function to update the cart badge when the page loads
updateCartBadge();
</script>
<script>
var cartModal = document.getElementById('cartModal');
cartModal.addEventListener('show.bs.modal', function () {
var cartContent = document.getElementById('cartContent');
cartContent.innerHTML = '<iframe src="cart.html" style="width: 100%; height: 400px; border: none;"></iframe>';
});
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/js/all.min.js"></script>
</body>
</html>