-
Notifications
You must be signed in to change notification settings - Fork 1
/
wishlist.html
523 lines (477 loc) · 16.4 KB
/
wishlist.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
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
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat&display=swap" rel="stylesheet">
<link rel="stylesheet" href="Homepage.css">
<style>
* {
font-family: sans-serif;
}
/* .navbar {
width: 100%;
border-bottom: 1px solid rgb(197, 197, 197);
display: flex;
justify-content: space-between;
} */
#logo {
height: 26px;
padding: 9px;
margin-left: 100px;
}
#topNavbar a{
color:black;
}
#midNavbar a {
color: black;
}
#userid {
height: 26px;
padding: 9px;
margin-right: 100px;
}
/* ---------------------------------------------------when cart is empty-------------------------------------------------- */
.emptyarrdiv {
width: 38%;
margin: 30px auto;
text-align: center;
}
#emptycart {
width: 150px;
}
#emptybagdiv {
border-bottom: 1px solid rgb(197, 197, 197);
}
#para {
font-size: 20px;
margin: 0;
color: rgb(105, 105, 105);
}
#para2 {
font-size: 16px;
margin-top: 20px;
color: rgb(105, 105, 105);
}
button {
padding: 10px;
font-size: 20px;
border: 2px solid rgb(8, 226, 215);
border-radius: 5px;
background: transparent;
display: inline-block;
margin: 15px 0px 25px 0px;
color: rgb(8, 226, 215);
}
#emptyarrtable {
margin: -25px auto;
margin-bottom: 20px;
text-align: left;
}
a {
color: rgb(8, 226, 215);
}
td {
padding: 8px 35px;
color: rgb(99, 99, 99);
}
.caintainerdiv {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
text-align: center;
width: 85%;
margin: auto;
}
#item {
padding: 10px;
position: relative;
}
#item>span {
padding-right: 1em;
}
#item>span~span{
text-decoration: line-through;
}
#item>img {
width: 300px;
}
#item>button {
width: 100%;
color: black;
cursor: pointer;
}
#rem {
display: flex;
align-items: center;
justify-content: center;
border-radius: 100%;
font-size: 25px;
height: 30px;
width: 30px;
cursor: pointer;
text-align: center;
position: absolute;
top: 5%;
right: 10%;
background-color: rgb(246, 246, 246);
}
#wish {
margin-left: 8%;
}
@media only screen and (min-width:0px) and (max-width:380px) {
.caintainerdiv {
grid-template-columns: repeat(2, 1fr);
}
}
/*------------------------------------- Scrool Bar Design------------------------------------------------- */
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-thumb {
background: linear-gradient(#3838389c, #1312127a);
border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
background: linear-gradient(#5ca3a6, #0051ff);
}
/*--------------------------------------- Scrool Bar Design End-------------------------------------------------- */
</style>
</head>
<body>
<!-- <************************************************Header **************************************> -->
<div id="Header"><a href="Homepage.html"></a>
<!-- <************************************************Top Navbar **************************************> -->
<div id="topNavbar">
<!-------------------------Left Part ------------------------------>
<div class="left">
<a href="">Offers</a>
<a href="">Fanbook</a>
<a href="">Download App</a>
<a href="">TriBe Membership</a>
</div>
<!------------------------ Right Part ------------------>
<div class="right">
<a href="">Contact Us</a>
<a href="">Track Order</a>
</div>
</div>
<!-- <************************************************Mid Navbar **************************************> -->
<div id="midNavbar">
<!------------------------------------------ Left Part -------------------------------------------------->
<div class="midLeft">
<div>
<a href="Homepage.html"><img class="imglogo"
src="https://images.bewakoof.com/web/bewakoof-primary-logo-white-bg-2x-1635745564.png"
alt=""></a>
</div>
</div>
<!------------------------------------------ Mid Part -------------------------------------------------->
<div class="midMid">
<a href="Mens.html">MEN</a>
<a href="Womens.html">WOMEN</a>
<a href="Accessories.html">ACCESSORIES</a>
</div>
<a id="searchLogo" href=""><img src="https://cdn-icons-png.flaticon.com/128/54/54481.png" alt=""></a>
<input type="text" class="search" placeholder="Search by product, categories or collection">
<!------------------------------------------ Right Part -------------------------------------------------->
<div class="midRight">
<a href="login.html"><img
src="https://cdn2.iconfinder.com/data/icons/e-commerce-line-4-1/1024/user4-128.png" alt=""></a>
<a href="wishlist.html"><img
src="https://cdn0.iconfinder.com/data/icons/small-n-flat/24/678087-heart-128.png"
alt="wishlist"></a>
<a href="AddToCart.html"><img
src="https://cdn1.iconfinder.com/data/icons/shopping-346/24/buy-bag-cart-shop-shopping-128.png"
alt="cart"></a>
</div>
</div>
<hr>
<!-- -----------------------------------------------Navbar-------------------------------------------------- -->
<!-- <div class="navbar">
<div onclick="window.location.href='Homepage.html'">
<img src="https://images.bewakoof.com/web/bewakoof-primary-logo-white-bg-2x-1635745564.png" alt="logo"
id="logo" />
</div>
<div id="userid">
<span style="display: block;" id="usernameh"></span>
<span id="useremailh"></span>
</div>
</div> -->
<!-- -----------------------------------------------Navbar(↑)-------------------------------------------------- -->
<!-- -----------------------------------------------empty wishlist-------------------------------------------------- -->
<div class="emptyarrdiv">
<div id="emptybagdiv">
<img src="https://images.bewakoof.com/web/group-3x-1509961969.png" alt="emptywishlist" id="emptycart" />
<p id="para">Your Wishlist is Empty !</p>
<button>Continue Shoping</button>
</div>
<div>
<p id="para2">You could try one of these categories:</p>
<table id="emptyarrtable">
<tr>
<td id="t">Men</td>
<td>
<p><a href="#">Topwere</a></p>
<p> <a href="#">Footwear</a></p>
</td>
<td>
<p><a href="#">Bottomwere</a></p>
<p><a href="#">Bestsellers</a></p>
</td>
</tr>
<tr>
<td>Women</td>
<td>
<p><a href="#">topwere</a></p>
<p><a href="#">Bestsellers</a></p>
</td>
<td><a href="#">Bottomwere</a></td>
</tr>
<tr>
<td>Mobile</td>
<td><a href="#">AllMobileCover</a></td>
<td></td>
</tr>
</table>
<img src="https://images.bewakoof.com/web/secure-payments-image.png" alt="">
</div>
</div>
<!-- -----------------------------------------------empty wishlist(↑)-------------------------------------------------- -->
<h2 id="wish">WISHLIST</h2>
<div class="caintainerdiv">
</div>
<!-- ****************************************************** Footer Section****************************************** -->
<div id="footer">
<!------------------------------------------ Bewakoof Logo -------------------------------------------------->
<div class="logo">
<img src="https://i2.wp.com/www.indiaretailing.com/wp-content/uploads/2021/07/Bewakoof-logo.jpg?fit=1334%2C633&ssl=1"
alt="">
</div>
<br>
<!-- ****************************************************** Customer Service ****************************************** -->
<div class="cusDetails">
<div class="customer">
<h5>CUSTOMER SERVICE</h5>
<ul>
<li>Contact Us</li>
<li>Track Order</li>
<li>Return Order</li>
<li>Cancel Order</li>
</ul>
</div>
<div class="customer">
<h5>COMPANY</h5>
<ul>
<li>About Us</li>
<li>We're Hiring</li>
<li>Terms & Conditions</li>
<li>Privacy Policy</li>
<li>Blog</li>
</ul>
</div>
<div class="customer" id="icons">
<h5>CONNECT WITH US</h5>
<ul>
<li><img src="https://cdn1.iconfinder.com/data/icons/social-media-color-1/128/yumminky-social-media-01-128.png"
alt="">
4.7M People Like this</li>
<li><img src="https://cdn2.iconfinder.com/data/icons/social-media-applications/64/social_media_applications_3-instagram-128.png"
alt=""> 1M Followers</li>
<li><img src="https://cdn2.iconfinder.com/data/icons/social-media-2285/512/1_Twitter3_colored_svg-128.png"
alt=""> <img
src="https://cdn3.iconfinder.com/data/icons/modern-social-free/1024/Pinterest-128.png"
alt=""> <img
src="https://cdn2.iconfinder.com/data/icons/social-media-2285/512/1_Snapchat_colored_svg-128.png"
alt=""> <img style="filter: invert(1);"
src="https://cdn0.iconfinder.com/data/icons/aami-apple-devices/64/apple-29-128.png" alt="">
</li>
</ul>
</div>
<div class="inputt">
<h5>KEEP UP TO DATE</h5>
<ul>
<li> <input id="mailName" type="email" placeholder="Enter Email Id" required></li>
<li><input id="subBtn" type="submit" value="SUBSCRIBE"></li>
</ul>
</div>
</div>
<br>
<br>
<div id="paymentgateway">
<div>
<ul>
<li><img src="https://cdn0.iconfinder.com/data/icons/commerce-line-1/512/comerce_delivery_shop_business-24-128.png"
alt=""> 15 Days return policy</li>
<li><img src="https://cdn4.iconfinder.com/data/icons/essential-app-2/16/cash-money-coin-value-128.png"
alt=""> Cash on delivery*</li>
</ul>
</div>
<div>
<h5>DOWNLOAD THE APP</h5>
<img src="https://images.bewakoof.com/web/app_android_v1.png" alt="">
<img src="https://images.bewakoof.com/web/app_ios_v1.png" alt="">
</div>
<div>
<h5>100% SECURE PAYMENT</h5>
<img src="https://images.bewakoof.com/web/secure-payments-image.png" alt="">
</div>
</div>
<br>
<hr class="mrgn">
<br>
<div id="allDetails">
<div>
<h3>MEN'S CLOTHING</h3>
<ul>
<li>Top Wear</li>
<li>Men's New Arrivals</li>
<li>Men's Half Sleeve T-Shirts</li>
<li>Men's Hoodies & Sweatshirts</li>
<li>Men's Long Sleeve T-shirts</li>
<li>Men's Printed T-shirts</li>
<li>Men's Plain T-shirts</li>
<li>Men's Vests</li>
<li>Men's Polo T-Shirts</li>
<li>Men's Kurtas</li>
<li>Men's Combo T-Shirts</li>
<li>Men's Shirts</li>
<li>Men's Nightwear</li>
<li>Men's Plus Size Store</li>
</ul>
<ul>
<li>Bottom Wear</li>
<li>Men's Pajamas</li>
<li>Men's Boxer Shorts</li>
<li>Men's Shorts</li>
<li>Men's Track Pants</li>
<li>Men's Pants</li>
</ul>
<ul>
<li>Featured</li>
<li>Men's Flip Flops</li>
<li>Men's Sliders</li>
<li>Marvel T-Shirts</li>
<li>Disney T-Shirts</li>
<li>Avengers T-Shirts</li>
<li>Star Wars T-Shirts</li>
<li>Batman T-Shirts</li>
<li>Superman T-Shirts</li>
<li>Joker T-Shirts</li>
</ul>
</div>
<div>
<h3>WOMEN'S CLOTHING</h3>
<ul>
<li>Women's Top Wear</li>
<li>Women's New Arrivals</li>
<li>Women's T-Shirts</li>
<li>Women's Hoodies & Sweatshirts</li>
<li>Women's Dresses</li>
<li>Women's 3/4 Sleeve T-Shirts</li>
<li>Women's Kurtis</li>
<li>Women's Combo T-Shirts</li>
<li>Women's Nightwear</li>
<li>Women's Plus Size Store</li>
</ul>
<ul>
<li>Women's Bottom Wear</li>
<li>Women's Pajamas</li>
<li>Women's Boxer Shorts</li>
<li>Women's Jeans</li>
<li>Women's Joggers</li>
<li>Women's Shorts</li>
</ul>
<ul>
<li>BAGS</li>
<li>Laptop Bags</li>
<li>Small Backpacks</li>
</ul>
<ul>
<li>Featured</li>
<li>Women's Slides</li>
<li>Women's Flip Flops</li>
</ul>
</div>
<div>
<h3>MOBILE COVERS</h3>
<ul>
<li>Brands</li>
<li>Apple</li>
<li>Realme</li>
<li>Samsung</li>
<li>Xiaomi</li>
<li>Oneplus</li>
<li>Vivo</li>
<li>Oppo</li>
</ul>
</div>
<div class="offerArea">
<h3>FANBOOK</h3>
<h3>OFFERS</h3>
<h3>SITEMAP</h3>
</div>
</div>
</body>
</html>
<script>
var arr = JSON.parse(localStorage.getItem("Wishlist")) || [];
var bagarr = JSON.parse(localStorage.getItem("addtobag")) || [];
createlement(arr);
initial(arr);
function initial(arr) {
if (arr.length >= 1) {
document.querySelector(".emptyarrdiv").style.display = "none";
} else {
console.log(arr.length);
document.querySelector(".caintainerdiv").style.display = "none";
document.querySelector("#wish").style.display = "none";
document.querySelector(".emptyarrdiv").style.display = "";
};
}
function createlement(arr) {
document.querySelector(".caintainerdiv").innerHTML = "";
arr.map(function creatboby(obj, index) {
var div = document.createElement("div");
div.setAttribute("id", "item");
var img = document.createElement("img");
img.setAttribute("src", obj.image_url);
var name = document.createElement("p");
name.textContent = obj.name;
var pric = document.createElement("span");
pric.textContent = obj.price;
var strik = document.createElement("span");
strik.textContent = obj.strikedoffprice;
var btn = document.createElement("button");
btn.textContent = "Move To Bag";
btn.addEventListener("click", function () {
addtobag(obj);
});
var remov = document.createElement("div");
remov.setAttribute("id", "rem");
remov.addEventListener("click", function () {
deleteitem(index);
});
var spa = document.createElement("span");
spa.innerHTML = "×";
remov.append(spa);
div.append(img, name, pric, strik, btn, remov);
document.querySelector(".caintainerdiv").append(div);
});
};
function deleteitem(index) {
arr.splice(index, 1);
localStorage.setItem("Wishlist", JSON.stringify(arr));
createlement(arr);
initial(arr);
}
function addtobag(obj) {
bagarr.push(obj);
alert("Your item added to cart");
localStorage.setItem("addtobag", JSON.stringify(bagarr));
}
</script>