forked from anandsinghyadav/Ebay-Website-Clone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MahiArt.html
564 lines (384 loc) · 15 KB
/
MahiArt.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
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
<!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>
<script src="https://kit.fontawesome.com/1cb0bb75dc.js" crossorigin="anonymous"></script>
</head>
<link rel="stylesheet" href="style/MahiArt.css">
<link rel="stylesheet" href="style/Mahenav.css">
<!-- <link rel="stylesheet" href="style/MSmartwatch.css"> -->
<script src="MSdata.js"></script>
<style>
#appendhere {
/* border: 1px solid red; */
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 15px;
width: 80%;
margin-left: -30%;
}
#sold {
color: red
}
#artimage {
max-width: 200px;
height: 250px;
}
#bottom {
margin-left: -80px;
width: 100%;
}
#div1 {
/* border: 0.01px solid rgb(125, 125, 141); */
box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
box-sizing: border-box;
padding: 3px;
max-width: 300px;
}
#price {
font-weight: bold;
}
#sprice {
color: rgb(100, 96, 96)
}
#spn {
font-size: 10px;
font-family: "Market Sans", Arial, sans-serif;
}
#name {
height: 120px;
font-size: 20px;
}
#pmitemImages {
max-width: 1000px;
display: flex;
overflow-x: scroll;
gap: 30px;
}
#pmitemImages>.mitemImages {
border: gray solid 1px;
}
#div1>#artimage {
max-width: 300px;
}
/* 1st navbar css part end here */
</style>
<body>
<div id="sc1">
<div id="sc11">
<h4 id="sc111">Hi! <a href="signin.html">Sign in</a> or <a href="register.html">register</a></h4>
<h4> <a href="" style="color:black; text-decoration: none; ">Daily Deals</a></h4>
<h4><a href="" style="color:black; text-decoration: none;">Help & Contact</a></h4>
</div>
<div id="sc12">
<h4>Sell </h4>
<h4>Watchlist <i class="fa-solid fa-angle-down"></i></h4>
<div id="helloMouse">
<h4 onclick="window.location.href='signin.html'">My eBay<i class="fa-solid fa-angle-down"></i></h4>
<div id="absolute_My_eBay">
<a href="">
<p>Summary</p>
</a>
<a href="">
<p>Recently Viewed</p>
</a>
<a href="">
<p> Bids/Offers</p>
</a>
<a href="watchlist.html">
<p>Watchlist</p>
</a>
<a href="">
<p>Purchase History</p>
</a>
<a href="">
<p>Buy Again</p>
</a>
<a href="">
<p>Selling</p>
</a>
<a href="saved.html">
<p>Saved Searches</p>
</a>
<a href="">
<p>Saved Sellers</p>
</a>
<a href="">
<p>Messages</p>
</a>
</div>
</div>
<div style="padding:3.5%;" id="sc121">
<i class="fa-solid fa-bell"></i>
<div id="sc122">
<h1>You are all caught up!</h1>
</div>
</div>
<div style="margin:5%;" id="sc13">
<i class="fa-solid fa-cart-shopping"></i>
<div id="sc131">
<h1>Your cart is empty</h1>
<h3>Time to start shopping!</h3>
</div>
</div>
</div>
</div>
<hr style="margin-top:-1%; color: #f1ebeb;">
<!--
1st nav bar ends here
-->
<div id="sc2">
<div id="sc21" onclick="window.location.href='index.html'">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/EBay_logo.svg/1200px-EBay_logo.svg.png"
alt="">
</div>
<div id="sc22">
<p>
Shop by category
</p>
<i class="fa-solid fa-angle-down"></i>
</div>
<div id="sc23">
<i class="fa-solid fa-magnifying-glass" style="margin-left: 5px;"></i>
<input type="text" name="" id="">
<div>
<button name="" id="">
All category
</button>
<i class="fa-solid fa-angle-down"></i>
</div>
</div>
<button>
Search
</button>
</div>
<div id="sc3">
<hr>
</div>
<div id="pagediv" style="margin-top: 30px;">
<div id="center" style="padding-top: 0px; margin-top: 0px;">
<div id="left" b style="width: 600px;">
<h1>Art Supplies</h1>
<h4>Shop by Category</h4>
<p>Crafts</p>
<!-- dropdown menu -->
</div>
<div id="right" style="margin-top: 0px;">
<div id="pmitemImages">
<div class="mitemImages">
<img src="https://i.ebayimg.com/thumbs/images/g/vIMAAOSw8KJb0x0n/s-l225.webp" alt="">
<h4> Cell Phones, Smart Watches & Accessories</h4>
</div>
<div class="mitemImages">
<img src="https://i.ebayimg.com/thumbs/images/g/EVMAAOSwCnVb0x1D/s-l225.webp" alt="">
<h4>Smart Watches</h4>
</div>
<div class="mitemImages">
<img src="https://i.ebayimg.com/thumbs/images/g/C9IAAOSwv-xb0x1g/s-l225.webp" alt="">
<h4> Video Games & Consoles</h4>
</div>
<div class="mitemImages">
<img src="https://i.ebayimg.com/thumbs/images/g/cGUAAOSwTxpb0x1v/s-l225.webp" alt="">
<h4>Computers, Tablets & Network Hardware</h4>
</div>
<div class="mitemImages">
<img src="https://i.ebayimg.com/thumbs/images/g/lkMAAOSwy-5b0x1-/s-l225.webp" alt="">
<h4> Cameras & Photo</h4>
</div>
<div class="mitemImages">
<img src="https://i.ebayimg.com/thumbs/images/g/rhEAAOSwP3Jb0x2Q/s-l225.webp" alt="">
<h4> Camera Drones</h4>
</div>
<div class="mitemImages">
<img src="https://i.ebayimg.com/thumbs/images/g/M0gAAOSw5Xpb0x2j/s-l225.webp" alt="">
<h4> Portable Audio & Headphones</h4>
</div>
<div class="mitemImages">
<img src="https://i.ebayimg.com/thumbs/images/g/UuQAAOSwHSlb0x2z/s-l225.webp" alt="">
<h4> TV, Video & Home Audio Electronics</h4>
</div>
<div class="mitemImages">
<img src="https://i.ebayimg.com/thumbs/images/g/N9wAAOSwfONb0yLH/s-l225.webp" alt="">
<h4> Vehicle Electronics & GPS</h4>
</div>
<div class="mitemImages">
<img src="https://i.ebayimg.com/thumbs/images/g/nrIAAOSwCsRb0yJc/s-l225.webp" alt="">
<h4> Smart Home</h4>
</div>
</div>
<h2>Shop By Category</h2>
<div id="one">
<!-- <div class="image" onclick="addFun('1')">
<img class="img" src="https://i.ebayimg.com/thumbs/images/g/jIMAAOSwuTxV-ohS/s-l225.webp"
alt="" />
<p class="hov">Painting Supplies</p>
</div>
<div class="image" onclick="addFun('2')">
<img class="img" src="https://i.ebayimg.com/thumbs/images/g/G1AAAOSw9r1V-ohS/s-l225.webp"
alt="" />
<p class="hov">Drawing & Lettering</p>
</div>
<div class="image" onclick="addFun('3')">
<img class="img" src="https://i.ebayimg.com/thumbs/images/g/piQAAOSwNP5dU~2R/s-l225.webp"
alt="" />
<p class="hov">Printmaking</p>
</div>
<div class="image" onclick="addFun('4')">
<img class="img" src="https://i.ebayimg.com/thumbs/images/g/0vMAAOSwEetV-ohV/s-l225.webp"
alt="" />
<p class="hov">Collage Supplies</p>
</div>
<div class="image" onclick="addFun('5')">
<img class="img" src="https://i.ebayimg.com/thumbs/images/g/eOUAAOSwQPlV-ohS/s-l225.webp"
alt="" />
<p class="hov">Instruction Books and Media</p>
</div> -->
</div>
<div id="bottom">
<h2>limited time deals</h2>
<div id="b1">
<div id="sizeDiv">
<div>
<p class="hov">perfect choice</p>
</div>
<div>
<p class="hov">elected</p>
</div>
<div>
<p class="hov">see</p>
</div>
<div>
<p class="hov">free coupen</p>
</div>
</div>
</div>
<div id="b2">
<div id="appendhere"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="footerpart"></div>
</body>
</html>
<script type="module">
import { footer } from "./footer/footer.js"
var x = footer()
document.getElementById("footerpart").innerHTML = x
</script>
<script>
// function addFun(value) {
// if (value == '1') {
// localStorage.setItem("search_term", "Painting Supplies");
// window.location.href = "CatArt.html";
// }
// else if (value == '2') {
// localStorage.setItem("search_term", "Drawing & Lettering");
// window.location.href = "CatArt.html";
// }
// else if (value == '3') {
// localStorage.setItem("search_term", "Printmaking");
// window.location.href = "CatArt.html";
// }
// else if (value == '4') {
// localStorage.setItem("search_term", "Collage Supplies");
// window.location.href = "CatArt.html";
// }
// else if (value == '5') {
// localStorage.setItem("search_term", "Instruction Books and Media");
// window.location.href = "CatArt.html";
// }
// }
//localStorage.setItem("search_term", "mobile");
var arr = JSON.parse(localStorage.getItem("items"));
console.log(arr);
// console.log(data)
var dataArr = arr;
console.log(dataArr)
dataArr.forEach(function (el) {
var div1 = document.createElement("div")
div1.setAttribute("id", "div1")
let image = document.createElement("img")
image.src = el.thumbnail
image.setAttribute("id", "artimage")
let spn = document.createElement("p")
spn.innerText = el.spn;
spn.setAttribute("id", "spn")
let name = document.createElement("p")
name.innerText = el.title;
name.setAttribute("id", "name")
price = document.createElement("p")
try {
if (el.price.raw) {
price.innerText = el.price.raw;
} else {
price.innerText = el.price.to.raw;
}
} catch (error) {
console.log(error);
}
price.setAttribute("id", "price")
sprice = document.createElement("p")
sprice.innerText = el.shipping || " ";
sprice.setAttribute("id", "sprice")
sold = document.createElement("p")
if (el.extensions) {
sold.innerText = el.extensions[el.extensions.length - 1];
} else {
sold.innerText = "";
}
sold.setAttribute("id", "sold")
div1.append(image, spn, name, price, sprice, sold)
div1.addEventListener("click", function () {
let eeeeeeeeee = JSON.parse(localStorage.getItem("Database")) || [];
eeeeeeeeee.push(el);
localStorage.setItem("Database", JSON.stringify(eeeeeeeeee));
window.location.href = "review.html"
});
document.getElementById("appendhere").append(div1)
});
document.querySelector("#left > h1").innerHTML = localStorage.getItem("search_term")
</script>
<script>
let shubham001 = document.querySelector("#sc23 > input[type=text]")
shubham001.addEventListener("keypress", function (event) {
if (event.code == "Enter") {
localStorage.setItem("search_term", shubham001.value);
window.location.href = "MahiArt.html";
}
})
document.querySelector("#sc2 > button").addEventListener("click", function (event) {
localStorage.setItem("search_term", shubham001.value)
window.location.href = "MahiArt.html"
})
</script>
<script>
let flagfornav = JSON.parse(localStorage.getItem("flagforindex"))
let logindata = JSON.parse(localStorage.getItem("loginData"))
let namefornav = logindata[0].name
console.log(flagfornav)
if (flagfornav == true) {
console.log(namefornav)
document.querySelector("#sc111").textContent = namefornav
}
</script>
<script>
let nightmitemImages = document.querySelectorAll(".mitemImages>img");
let nighth4 = document.querySelectorAll(".mitemImages>h4");
let itemimages2 = document.querySelectorAll(".mitemImages");
for (let i = 0; i < nightmitemImages.length && i < arr.length; i++) {
nightmitemImages[i].src = arr[i].thumbnail;
nighth4[i].innerText = arr[i].title.trim().split(" ")[0] + " " + arr[i].title.trim().split(" ")[1] + " " + arr[i].title.trim().split(" ")[2] + " " + arr[i].title.trim().split(" ")[3] + " " + arr[i].title.trim().split(" ")[4];
}
for (let i = 0; i < nightmitemImages.length; i++) {
itemimages2[i].addEventListener("click", function () {
localStorage.setItem("search_term", nighth4[i].innerText);
window.location.href = "MahiArt.html";
});
}
</script>