forked from anandsinghyadav/Ebay-Website-Clone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Nanduwatches.html
285 lines (196 loc) · 5.66 KB
/
Nanduwatches.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>Document</title>
</head>
<script src="script/data.js"></script>
<link rel="stylesheet" href="style/MahiArt.css">
<link rel="stylesheet" href="style/Mahenav.css">
<style>
body {
/* position: relative; */
background-color: #f6f6f6;
}
#ShowData {
display: grid;
width: 96%;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(auto, 300px);
grid-gap: 10px;
margin: auto;
justify-content: center;
}
#ShowData>div {
border: 1px solid Grey;
background-color: white;
display: flex;
flex-direction: column;
justify-content: space-between;
}
#ShowData>div :nth-of-type(1) {
margin-left: 20px;
}
</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="ShowData"></div>
<div id="footerpart"></div>
</body>
</html>
<script>
let showData = document.querySelector("#ShowData");
let ApnaData = JSON.parse(localStorage.getItem("items"));
console.log("ApnaData:", ApnaData);
let appendApnaData = (data) => {
data.forEach((elem) => {
let div = document.createElement("div");
div.addEventListener("click", () => {
storeData(elem);
});
let imgD = document.createElement("div");
let img = document.createElement("img");
img.src = elem.thumbnail;
imgD.append(img);
let content_div = document.createElement("div");
let info = document.createElement("p");
info.innerText = elem.title;
let price = document.createElement("h3");
if (elem.price.raw === undefined) {
price.innerText = elem.price.to.raw;
} else {
price.innerText = elem.price.raw;
}
content_div.append(info, price);
div.append(imgD, content_div);
showData.append(div);
});
};
appendApnaData(ApnaData);
let data1 = [];
let storeData = (elem) => {
data1.push(elem);
localStorage.setItem("Database", JSON.stringify(data1));
window.location.href = "review.html";
};
</script>
<script type="module">
import { footer } from "./footer/footer.js"
var x = footer()
document.getElementById("footerpart").innerHTML = x
</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>