-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfavPage.html
285 lines (257 loc) · 8.77 KB
/
favPage.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
<!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>Pantaloons User Saved Items</title>
<link
href="https://www.dafontfree.net/embed/Z290aGFtLWJvb2smZGF0YS8yNS9nLzEyNzUxOC9Hb3RoYW1Cb29rLnR0Zg"
rel="stylesheet"
type="text/css"
/>
<link rel="stylesheet" href="products.css" />
<link rel="stylesheet" href="fontpage.js" />
<!-- navbar icons link -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
/>
<!-- favicon link -->
<link rel="manifest" href="/site.webmanifest" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons+Outlined"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<link rel="stylesheet" href="fav.css" />
<style>
.btnremove {
background-color: #00aa8a;
color: white;
width: 70%;
height: 40px;
margin-left: 65px;
margin-top: 10px;
border: 1px solid #00aa8a;
border-radius: 5px;
}
</style>
</head>
<body>
<!-- top line start -->
<a href=""
><div id="top">
Diwali Dhamaka: Upto 60% Off + Extra 20% Off on orders of Rs. 3500 &
above. Use Coupon: DIWALISALE | * T & C Apply. Shop Now
</div></a
>
<!-- top line end -->
<!-------------------------------- navigation bar start --------------------------------------------------------->
<ul id="navbar">
<img
id="myntraimg"
src="https://pantaloons.imgix.net/img/app/brands/pantaloons/v2/PT_D_logo.png"
/>
<!-- women section start -->
<a href="womens.html"
><li>
WOMEN
<!-- hover contents -->
<div id="innerdiv">
<ul class="innerul">
<li class="head">NEW ARRIVALS</li>
<li class="tail">tees & tops</li>
<li class="tail">jeans</li>
<li class="tail">Shorts & Capris</li>
</ul>
<ul>
<li class="head">WESTERN WEAR</li>
<li class="tail">Tees & Tops</li>
<li class="tail">Shirts & Blouses</li>
<li class="tail">Dresses & Jumpsuits</li>
<li class="tail">Suits & Blazers</li>
<li class="tail">Sweaters & Sweatshirts</li>
<li class="tail">Shrugs</li>
<li class="tail">Jackets</li>
<li class="tail">Trousers</li>
<li class="tail">Jeans</li>
<li class="tail">Shorts</li>
<li class="tail">Culottes & Capris</li>
<li class="tail">Skirts</li>
</ul>
<ul>
<li class="head">ETHNIC WEAR</li>
<li class="tail">Kurtas</li>
<li class="tail">Kurtis & Tunics</li>
<li class="tail">Tops & Cholis</li>
<li class="tail">Kurta Sets</li>
<li class="tail">Dresses</li>
<li class="tail">Dupattas</li>
<li class="tail">Leggings</li>
<li class="tail">Skirts & Lehengas</li>
<li class="tail">Pants & Palazzos</li>
<li class="head">SARIS</li>
<li class="head">PLUS SIZE</li>
</ul>
<ul>
<li class="head">HANDBAGS</li>
<li class="head">FOOTWEAR</li>
<li class="tail">Ballerina</li>
<li class="tail">Flip Flops</li>
<li class="tail">Sandals</li>
<li class="tail">Heels</li>
<li class="tail">Sneakers</li>
<li class="tail">Casual Shoes</li>
<li class="tail">Loafers</li>
<li class="head">ATHLEISURE</li>
<li class="head">INNER WEAR</li>
<li class="head">SLEEPWEAR</li>
<li class="head">MASKS</li>
</ul>
</div>
</li></a
>
<!-- women section end ---------------->
<!-- men section start -->
<li>
MEN
<div id="innerdiv"></div>
</li>
<!-- men section end ----------------------->
<!-- kids section start -->
<li>
KID
<div id="innerdiv"></div>
</li>
<!-- women section end ----------------------->
<!-- home section start -->
<li>
HOME
<div id="innerdiv"></div>
</li>
<!-- home section end --------------------->
<!-- accessories section start -->
<li>
ACCESSORIES
<div id="innerdiv"></div>
</li>
<!-- accessories section end ---------------->
<!-- brans section start -->
<li class="move">BRANDS</li>
<!-- brans section end ---------------------->
<!-- sale section start -->
<li class="sale">SALE</li>
<!-- sale section end ----------------------->
<!-- search button with icon -->
<div>
<a href=""
><p class="sp">
<span>GREENCARD</span><span class="move">TRACK ORDER</span
><span class="move">STORE LOCATOR </span
><span class="move">CONTACT US</span>
</p></a
>
<input
class="search"
type="text"
placeholder="Search.."
name="search"
/>
<button class="searchicon" type="submit">
<i class="fa fa-search"></i>
</button>
<button id="login" class="btn_design">
<i class="fa fa-user-circle-o" aria-hidden="true"></i>
<p class="lo"></p>
</button>
<select id="navprofile" onchange="profile()">
<option value=""></option>
<option value="account">My Account</option>
<option value="order">My Order</option>
<option value="wishlist">My wishlist</option>
<option value="return">Return</option>
</select>
<a href="fav.html"
><button class="btn_design">
<i class="fa fa-heart-o" aria-hidden="true"></i></button
></a>
<a class="cartref" href="cart.html"
><button class="btn_design">
<i class="fa fa-shopping-bag" aria-hidden="true"></i></button
></a>
</div>
</ul>
<hr />
<div id="rimages">
<!-- <div class="img">Hi</div>
<div class="img">HI</div>
<div class="img">HI</div>
<div class="img">HI</div>
<div class="img">HI</div> -->
</div>
</body>
<script src="fav.js"></script>
</html>
<script>
var favdatas = JSON.parse(localStorage.getItem("favdata"));
console.log(favdatas);
showProducts(favdatas);
function showProducts(event) {
event.map(function (item) {
var imgs = document.createElement("img");
imgs.setAttribute("src", item.image_url);
imgs.setAttribute("id", "imageSizing");
var type = document.createElement("p");
type.textContent = item.type;
type.setAttribute("class", "paraStyle");
var description = document.createElement("p");
description.textContent = item.dsc;
description.setAttribute("class", "paraStyle1");
var x = document.createElement("div");
x.setAttribute("id", "x");
var price = document.createElement("span");
price.textContent = "₹" + item.MRP;
price.setAttribute("class", "pricing");
var disc = document.createElement("span");
disc.textContent = "₹" + item.discount;
disc.setAttribute("id", "discStyle");
var discPer = document.createElement("span");
discPer.textContent = item.discountPercentage + "% OFF";
discPer.setAttribute("id", "discPerStyle");
x.append(price, disc, discPer);
var imgDiv = document.createElement("div");
imgDiv.setAttribute("id", "img");
var btn = document.createElement("button");
btn.setAttribute("class", "btnremove");
btn.textContent = "Remove";
btn.addEventListener("click", function () {
remove(item);
});
imgDiv.append(imgs, type, description, x, btn);
document.getElementById("rimages").append(imgDiv);
// imgDiv.append(x);
});
}
function remove(item) {
favdatas.splice(favdatas.indexOf(item), 1);
localStorage.setItem("favdata", JSON.stringify(favdatas));
window.location.reload(true);
}
//
document.querySelector("#login").addEventListener("click", login);
function login() {
window.location.href = "login.html";
}
function profile() {
var ans = document.querySelector("#navprofile").value;
console.log(ans);
if (ans == "account") {
window.location.href = "myaccount.html";
}
}
</script>