forked from GauravPimplekar/UNIT2-PROJECT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appcard.html
358 lines (271 loc) · 15.9 KB
/
appcard.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
<!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 = "icon" href =
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRfYDnyF-tJ9iSC8ZDjxPg4Ca0Hm415fkxX_A&usqp=CAU"
type = "image/x-icon">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel='stylesheet' href='https://cdn-uicons.flaticon.com/uicons-regular-rounded/css/uicons-regular-rounded.css'>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="navbar1.css">
<style>
*{
position: relative;
}
h5{
background-color: gainsboro;
width: auto;
display: inline;
}
#container{
width: 95%;
margin: auto;
}
#container > div{
display: flex;
position: relative;
margin-bottom: 40px;
height: 300px;
}
img{
width: 120px;
height: 200px;
margin-top: 30px;
}
#data{
display: block;
}
#itemfun > div{
display: inline;
padding: 10px;
border: 1px solid red;
}
#itemfun{
position: absolute;
right: 400px;
top: 30px;
}
#display{
position: absolute;
right: 0;
}
#header{
padding-left: 30px;
}
#remove{
border-radius: 50%;
}
#add{
border-radius: 50%;
}
#checkout{
position: absolute;
right: 30px;
border: 0;
color: teal;
margin-bottom: 50px;
}
#checkout:hover{
color: white;
background-color: teal;
border: 0;
}
#top{
display: flex;
font-weight: 400;
font-size: 22px;
width: 420px;
justify-content: space-between;
margin-left: 30px;
margin-top: 40px;
}
#top > div{
justify-content: space-between;
}
#shop{
background-color: gray;
padding: 10px 15px;
}
#later{
background-color: white;
padding: 10px 15px;
}
</style>
</head>
<body>
<div id="navbar">
<div><p>Give Mom $150 in Gift Cards, earn a $25 Promo Card! Ends May 9 at 1pm ET. Restrictions apply. Online only.<a href="https://rack.giftcard.nordstrom.com/store/recipient?">Shop Gift Cards & See Restrictions</a></p></div>
<div id="head">
<div>
<div><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQMAAADCCAMAAAB6zFdcAAAAgVBMVEX///9TU0xQUElGRj5JSUFoaGKgoJ1LS0RERDxOTkdDQzv8/PzNz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/4zMDBwL5Q2Kk1soc6a6aVrVRiPj2wq6FGKpIoYjZx7l0Whp7zLbxNcNBTyw4O6j5NVZpiqSUGTRls2nrdjzToZEufmcznM09wADZuMOC4VGOsbQu7whMkgMFXCZ68/6DxmWc74iA4GJR1sHEDu+ktvjIPYt+eHsgYWO++xkUBn3Ze9ycOcxDJsJ49l888xUEqo/w9uxOXeyLkEoZMPfORN7jLpTKavLQpMKExLbdv+h6MNQQ07O9H7vsxxYGq9c22Lt6ZYl28HJqitQjf7tdEjoilDEQidmw5S9FJbjy2W6rmjbtAblCjuYJKkxw0HqqBHHMb1Nu142x9I9AKelES2YQq02x1DzRLrsu4vlw4+AodKdHIaE2r3rkPpfGZ57ldb5qDgxJVRsRhGGPmsOakAzXdZjNiLRZKqGGtHOBAFDul+rA9RzkmgVB7VL/DgfSZ0TzXrgIHI97cunOsoQ1+eCNT0rTicpnxsjShgiYdxfbWvTjSZ57nPu43OFh8jZzGgV2jYbNO3o5NRuHAaaY6d9h1It+7G0j6zM58Z7omttBlycCBHFu6DWlzEqobn10nXj8LfUfB3uMgleuRbIaFWHFMbuJurvRKXg+1IcpCpQabxKnv+fLy7nzG3SSvhwIRIX1HAt+8KyyTp/tmUAnLFccUndFqzwiFBXGEbMKMU9tWuof1drPZ7oLXWlWHQ3GzZ6HKvV/1htk2b9Znfb/fecpf/a9bgu3t+CSO7/s4uZz7F5yGkS6t0Nwb1PM8wyw2n9pL8BtwXy9S/Xb++WqjoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaHxL+O/rBPPlJpU340AAAAASUVORK5CYII="/></div>
<div> <button><i class="fa fa-search"></i></i></button><input type="text" placeholder="Search.." /> </div>
<div>
<div id="user"><a href="signin.html" ><img src="https://th.bing.com/th/id/OIP.IXo2-EG-CQaJeHN4-UFuZgHaHa?w=181&h=181&c=7&r=0&o=5&dpr=1.38&pid=1.7"/></a></div>
<select>
<option value="name"><h2>Hello,Sign in</h2></option>
<option value="signup"> Sign Up </option>
<option value="Createaccount">Create Account</option>
<option>Your Account</option>
<option value="Purchase">Purchase</option>
<option value="Wishlist">Wishlist</option>
<option value="shippingaddresses">Shipping Address</option>
<option value="Paymentmeathod">Payment Meathods</option>
<option value="Payandmanagecard">Pay & Manage Nordsstrom Card</option>
<option value="passwordandpersoninfo">Password and Personal info</option>
<option value="Emailpreferences"> Email & Preferences</option>
</select>
<i class="fi fi-rr-lock"></i>
</div>
</div>
</div>
<div id="head2">
<div>Clearance</div>
<div><a href="womenproduct.html">Women</a> </div>
<div> <a href="menproduct.html">Men</a></div>
<div>Kids</div>
<div>Shoes</div>
<div>Activewear</div>
<div>Bags & Accessories</div>
<div>Home</div>
<div>Beauty</div>
<div>Gifts</div>
<div>Flash Events</div>
</div>
</div>
<div id="top">
<div id="shop">Shopping Bag</div>
<div id="later">Save for Later (0)</div>
</div>
<div id="header">
<h1>Shopping bag</h1>
<p>Items in your bag are not on hold.</p>
<p>Add a gift message when you check out.</p>
<h5>Free Shipping on Orders over $89 for a limited time or free ship to U.S. stores.</h5>
<a href="">Learn More</a>
<hr>
</div>
</body>
</html>
<script >
// var seetotal = document.createElement("h1")
// seetotal.innerText = "SEE TOTAL"
// // seetotal.setAttribute("href","total.html")
// document.querySelector("body").append(seetotal)
var data = JSON.parse(localStorage.getItem("projectdata"))
document.querySelector("#shop").innerText = "Shopping Bag"+ "(" + data.length + ")"
var box = document.createElement("div")
box.setAttribute("id","container")
var jhola = localStorage.getItem("total")
console.log(typeof jhola)
var newtotal = +jhola
console.log(newtotal)
displaydata(data)
var total = 0
var subtotal = 0
function displaydata(data){
data.forEach(function(el,index){
var div = document.createElement("div")
var img = document.createElement("img")
img.setAttribute("src",el.img)
var brand = document.createElement("p")
brand.innerText = el.brand
var name = document.createElement("p")
name.innerText = el.name
var br1 = document.createElement("br")
var size = document.createElement("p")
size.innerText = "SIZE : Small"
var color = document.createElement("p")
color.innerText = "COLOR : black"
var Item = document.createElement("p")
Item.innerText = "Item : "+el.productID
var br2 = document.createElement("br")
var del = document.createElement("p")
del.innerText = "Delivery"
var date = document.createElement("p")
date.innerText = "Fri, 5/13–Wed, 5/18"
date.style.color = "gray"
var div1 = document.createElement("div")
div1.setAttribute("id","data")
div1.append(brand,name,br1,size,color,Item,br2,del,date)
var div2 = document.createElement("div")
var price = document.createElement("h2")
price.setAttribute("id","display")
price.innerText = el.cPrice
// var add = document.createElement("div")
// add.setAttribute("id","add")
// add.innerText = "+"
// add.addEventListener("click",function(){
// addone(el)
// })
// var display = document.createElement("div")
// display.innerText =el.cPrice
// var remove = document.createElement("div")
// remove.setAttribute("id","remove")
// remove.innerText = "-"
// remove.addEventListener("click",function(){
// removeone(el)
// })
// function addone(el){
// total = Number(display.innerText)
// total = total + el.price
// display.innerText = total
// price.innerText = "$"+ total
// newtotal = newtotal + el.price
// console.log(newtotal)
// localStorage.setItem("subtotal",(newtotal))
// // localStorage.setItem("total",(newtotal))
// total.innerText = newtotal
// // console.log(total)
// }
// function removeone(el){
// total = Number(display.innerText)
// total = total - el.price
// display.innerText = total
// price.innerText = "$" +total
// newtotal = newtotal - el.price
// console.log(newtotal)
// localStorage.setItem("subtotal",(newtotal))
// // localStorage.setItem("total",(newtotal))
// total.innerText = newtotal
// }
var hr = document.createElement("hr")
var removebutton = document.createElement("button")
removebutton.innerText = "Remove"
removebutton.style.color = "teal"
removebutton.style.border = "0"
removebutton.addEventListener("click",function(){
deleteitem(el,index)
})
div1.append(removebutton)
// div2.append(remove,display,add)
// div2.setAttribute("id","itemfun")
div.append(img,div1,div2,price)
box.append(div,hr)
document.querySelector("body").append(box)
})
var checkout = document.createElement("button")
checkout.setAttribute("id","checkout")
checkout.innerText = "Check-out"
checkout.addEventListener("click",checkoutfun)
checkout.style.width = "30%"
checkout.style.height = "50px"
document.querySelector("body").append(checkout)
function checkoutfun(){
window.location.href = "payment.html"
}
}
function deleteitem(el,index){
data.splice(index,1)
localStorage.setItem("projectdata",JSON.stringify(data))
window.location.reload()
// newtotal = newtotal - el.price
// localStorage.setItem("total",(newtotal))
// localStorage.setItem("subtotal",(newtotal))
}
</script>