-
Notifications
You must be signed in to change notification settings - Fork 0
/
wish.html
346 lines (329 loc) · 12.3 KB
/
wish.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
<!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">
<link rel="stylesheet" href="footer.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<title>Document</title>
<style>
body{
font-family: Whitney,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
-webkit-font-smoothing: antialiased;
}
h1{
text-align: center;
}
#container{
width:80%;
margin:auto;
/* border:1px solid; */
display:grid;
grid-template-columns: repeat(4,1fr);
gap:50px;
margin-left: 30px;
margin-right: 30px;
/* margin-top: 50px; */
/* position: relative; */
}
.mainwish{
margin-top: 50px;
}
#pricebox{
display:flex;
text-align: center;
justify-content: center;
margin-top: -15px;
}
#pricebox>p{
margin-right:20px;
}
#less{
color:rgb(211, 148, 2);
}
#ghat{
text-decoration-line: line-through;
color:grey;
}
#cover{
box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
}
#name{
text-overflow: ellipsis;
overflow: hidden;
width:240px;
/* height:1.2em; */
white-space: nowrap;
font-size: 15px;
margin-left: 20px;
margin-right: 10px;
}
/* #remove{
position: absolute;
border: 1px solid;
font-size: 25px;
top:5px
} */
/* #image{
position: relative;
} */
#container>div{
position: relative;
}
#remove{
position: absolute;
border: 1px solid;
font-size: 20px;
padding:2px 5px 2px 5px;
top:-12px;
right:5px;
border-radius: 30%;
color:orangered;
border-color: teal;
cursor:pointer
}
</style>
<link rel="stylesheet" href="navbar.css">
</head>
<body>
<!-- navbar -->
<div id="nav">
<div id="text">
<a href="index.html"><img src="https://images.indianexpress.com/2021/01/myntra.png" alt="image"></a>
<h4><a href="Product-Page/mens.html">MEN</a></h4>
<h4><a href="Product-Page/womens.html">WOMEN</a></h4>
<h4><a href="Product-Page/boy.html">KIDS</a></h4>
<h4><a href="Product-Page/combined.html">HOME & LIVING</a></h4>
<h4><a href="Product-Page/girl.html">BEAUTY</a> </h4>
<h4>STUDIO</h4>
</div>
<div class="searchbox">
<span class="material-icons search1">
search
</span>
<input class="searchbar" type="text"
placeholder="Search for products,brand and more">
</div>
<div class="nav_headingsright " >
<div class="personwithTitile">
<div>
<span class="material-icons">
person
</span>
</div>
<div>
<span class="Profile_title " ><a href="loginPage/signin.html">Profile</a></span>
</div>
</div>
<div class="personwithTitile">
<div>
<span class="material-icons">
favorite_border
</span>
</div>
<div>
<span class="Profile_title" style="margin-left: -7px;" >
<a href="wish.html">Wish list</a>
</span>
</div>
</div>
<div class="personwithTitile">
<div>
<span class="material-icons">
local_mall
</span>
</div>
<div>
<span class="Profile_title" style="margin-left: 2px;"><a href="bag.html">
Bag</a>
</span>
</div>
</div>
</div>
</div>
<br><br><br><br>
<div class="mainwish">
<h1>My Wishlist</h1>
<br><br>
<div id="container">
</div>
</div>
<!-- <footer></footer> -->
<div class="fcontainer">
<div class="fcard">
<div class="card1">
<h3>ONLINE SHOPPING</h3>
<br><br>
<p>Men</p>
<p>Women</p>
<p>Kids</p>
<p>Home & Living</p>
<p>Beauty</p>
<p>Gift Cards</p>
<p>Myntra Insider</p>
</div>
<div class="card1">
<h3>USEFUL LINKS</h3>
<br><br>
<p>Contact Us</p>
<p>FAQ</p>
<p>T&C</p>
<p>Terms Of Use</p>
<p>Track Orders</p>
<p>Shipping</p>
<p>Cancellation</p>
<p>Returns</p>
<p>Whitehat</p>
<p>Blog</p>
<p>Careers</p>
<p>Privacy policy</p>
<p>Site Map</p>
<p>Corporate Information</p>
</div>
<div class="card1">
<h3>EXPERIENCE MYNTRA APP ON MOBILE</h3>
<br><br>
<div>
<img class="appimg" src="https://constant.myntassets.com/web/assets/img/80cc455a-92d2-4b5c-a038-7da0d92af33f1539674178924-google_play.png"
alt="logoimage">
<img class="appimg" src="https://constant.myntassets.com/web/assets/img/bc5e11ad-0250-420a-ac71-115a57ca35d51539674178941-apple_store.png"
alt="logoimage">
</div>
<br><br>
<h3>KEEP IN TOUCH</h3>
<br>
<div class="appimgcard">
<img class="appimg1" src="https://constant.myntassets.com/web/assets/img/d2bec182-bef5-4fab-ade0-034d21ec82e31574604275433-fb.png"
alt="logoimage">
<img class="appimg1" src="https://constant.myntassets.com/web/assets/img/f10bc513-c5a4-490c-9a9c-eb7a3cc8252b1574604275383-twitter.png"
alt="logoimage">
<img class="appimg1" src="https://constant.myntassets.com/web/assets/img/a7e3c86e-566a-44a6-a733-179389dd87111574604275355-yt.png"
alt="logoimage">
<img class="appimg1" src="https://constant.myntassets.com/web/assets/img/b4fcca19-5fc1-4199-93ca-4cae3210ef7f1574604275408-insta.png"
alt="logoimage">
</div>
</div>
<div class="card1">
<div>
<img class="appimg3" src="https://constant.myntassets.com/web/assets/img/6c3306ca-1efa-4a27-8769-3b69d16948741574602902452-original.png"
alt="logoimage">
<p> <b>100% ORIGINAL</b> guarantee <br> for all products at myntra.com</p>
</div>
<br>
<div>
<img class="appimg2" src="https://constant.myntassets.com/web/assets/img/ef05d6ec-950a-4d01-bbfa-e8e5af80ffe31574602902427-30days.png"
alt="logoimage">
<p> <b>Return within 30days</b> of <br> receiving your order</p>
</div>
</div>
</div>
<div class="f-info">
<h3>POPULAR SEARCHES</h3>
<br>
<p>Makeup | Dresses For Girls | T-Shirts | Sandals | Headphones | Babydolls | Blazers For Men |
Handbags | Ladies Watches | Bags | Sport Shoes | Reebok Shoes | Puma Shoes | Boxers | Wallets |
Tops | Earrings | Fastrack Watches | Kurtis | Nike | Smart Watches | Titan Watches | Designer Blouse |
Gowns | Rings | Cricket Shoes | Forever 21 | Eye Makeup | Photo Frames | Punjabi Suits | Bikini | Myntra Fashion Show |
Lipstick | Saree | Watches | Dresses | Lehenga | Nike Shoes | Goggles | Bras | Suit |
Chinos | Shoes | Adidas Shoes | Woodland Shoes | Jewellery | Designers Sarees
</p>
<br>
<p>In case of any concern, <b>Contact Us</b> </p>
<br><br>
</div>
</div>
</body>
</html>
<script>
let bag_arr = JSON.parse(localStorage.getItem("bag_arr")) || []
let contain = JSON.parse(localStorage.getItem("wish_arr"));
// var con=JSON.parse(localStorage.getItem("bag_arr"));
// localStorage.setItem("bag_arr",JSON.stringify(contain)),
contain.forEach(function(elem,index) {
console.log(elem);
var box=document.createElement("div");
box.setAttribute("id","cover")
var image=document.createElement("img");
image.setAttribute("src",elem.image_url);
image.setAttribute("id","image");
image.style.position="relative"
image.style.width="100%"
image.style.display="flex";
image.style.margin="auto"
image.style.marginBottom="0px"
image.style.position="relative"
// image.append(remov)
var remov=document.createElement("p");
remov.innerText="X";
remov.style.marginTop="16px"
remov.style.color="gray"
remov.style.borderRadius="50%"
remov.style.border="0px"
remov.style.backgroundColor="white"
remov.setAttribute("id","remove");
remov.addEventListener("click",function(){
chlnikal(elem,index);
})
// image.append(remov)
var productname=document.createElement("h3");
productname.innerText=elem.name;
// productname.style.textAlign=""
productname.setAttribute("id","name")
productname.style.marginTop="10px";
productname.style.textAlign = "center"
productname.style.color="#535766"
var ik = document.createElement("p");
ik.innerText = "Brand :" + elem.brand;
ik.style.color = "teal";
ik.style.textAlign="center"
ik.style.fontSize = "13px";
ik.style.marginBottom = "10px";
var pricebox=document.createElement("div");
pricebox.setAttribute("id","pricebox");
pricebox.style.marginTop="20px"
// pricebox.style.margin="auto"
var price=document.createElement("p")
price.innerText=elem.price;
var offer=document.createElement("p")
offer.innerText=elem.pprice;
offer.setAttribute("id","ghat")
var off=document.createElement("p");
off.innerText=elem.off;
off.setAttribute("id","less")
pricebox.append(price,offer,off);
var butt=document.createElement("div");
butt.innerText="Move to Bag";
butt.style.color="#ff3f6c";
butt.style.borderColor="blue";
butt.style.border="1px solid #bbb";
butt.style.fontWeight="bold"
butt.style.textAlign="center";
butt.style.padding="7px";
butt.style.fontSize="18px"
butt.style.marginTop="15px";
butt.style.cursor="pointer";
butt.addEventListener("click",function(){
var objt1={
image_url:elem.image_url,
name:elem.name,
off:elem.off,
price:elem.price,
pprice:elem.pprice,
brand:elem.brand,
}
event.preventDefault()
bag_arr.push(index,1)
console.log(index,1)
localStorage.setItem("bag_arr",JSON.stringify(bag_arr))
// JSON.parse(localStorage.getItem("bag_arr")).push(objt1)
})
box.append(image,remov,productname,pricebox,butt);
document.querySelector("#container").append(box)
})
function chlnikal(elem,index) {
contain.splice(index,1);
localStorage.setItem("wish_arr",JSON.stringify(contain));
window.location.reload();
}
</script>