forked from arghadipmanna101/Flipkart_Clone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
img-add3.html
314 lines (261 loc) · 9.07 KB
/
img-add3.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flipkart</title>
<link
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
rel="stylesheet"
/>
<style>
.navbar-nav .nav-link:hover {
border-bottom: 2px solid #007bff; /* Change the color as desired */
}
.nav-link{
margin-right: 50px;
}
/* .navbar-nav .nav-link:hover {
border-bottom: 2px solid #007bff; /* Change the color as desired */
/* } */
/* Adjusting the width of the search input */
#input_data {
width: 400px; /* Adjust the width as needed */
}
.nav-item {
transition: background-color 0.5s ease;
}
.nav-item:hover {
background-color: grey;
text-decoration: underline;
opacity:1;
}
.nav-item:hover {
background-color: rgb(182, 181, 181);
text-decoration: none;
opacity: 0.85;
transition: all 0.2s ease-in;
transform:scale(1.1);
z-index: 1;
}
.nav-link {
text-decoration:none;
color: #000;
display: block;
padding: 20px;
}
.nav-link::after {
content:'';
opacity: 0;
transition: all 0.3s ease;
height: 2px;
width: 100%;
position: absolute;
bottom: 0;
left:0;
}
.nav-link:hover::after{
opacity:1;
}
</style>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" href="Navbar.css">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="https://flipkart-clone-seven-azure.vercel.app/">
<img
src="https://static-assets-web.flixcart.com/batman-returns/batman-returns/p/images/fkheaderlogo_exploreplus-44005d.svg"
width="160" height="40" title="Flipkart" alt="Flipkart" />
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<div class="navtab" id="searchbar">
<span>
<svg width="24" height="24" class="" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>Search Icon</title>
<path
d="M10.5 18C14.6421 18 18 14.6421 18 10.5C18 6.35786 14.6421 3 10.5 3C6.35786 3 3 6.35786 3 10.5C3 14.6421 6.35786 18 10.5 18Z"
stroke="#717478" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M16 16L21 21" stroke="#717478" stroke-width="1.4" stroke-linecap="round"
stroke-linejoin="round"></path>
</svg>
</span>
<span class="flex-grow">
<input id="input_data" type="text" placeholder="Search for Products, Brands and More" />
</span>
</div>
</li>
</ul>
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown">
<a class="nav-link" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
<img src="https://static-assets-web.flixcart.com/batman-returns/batman-returns/p/images/profile-815786.svg"
alt="Profile" />
Profile
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="profile.html">Profile</a>
<a class="dropdown-item" href="signup.html">SignUp</a>
<a class="dropdown-item" href="signin.html">SignIn</a>
<a class="dropdown-item" href="FPZ.html">Flipkart Plus Zone</a>
<a class="dropdown-item" href="order.html">Orders</a>
<a class="dropdown-item" href="#">Wishlist</a>
<a class="dropdown-item" href="#">Rewards</a>
<a class="dropdown-item" href="#">Gift Cards</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<img src="https://static-assets-web.flixcart.com/batman-returns/batman-returns/p/images/Store-9eeae2.svg"
alt="Become a Seller" />
Become a Seller
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./cart/cart.html">
<img
src="https://static-assets-web.flixcart.com/batman-returns/batman-returns/p/images/header_cart-eed150.svg"
/>
Cart
</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link" href="#" id="moreLinksDropdown" role="button" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
<img
src="https://static-assets-web.flixcart.com/batman-returns/batman-returns/p/images/header_3verticalDots-ea7819.svg"
alt="More Links" />
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="moreLinksDropdown">
<a class="dropdown-item" href="/communication-preferences/push?t=all"> <img width="26" height="18" src="https://img.icons8.com/fluency-systems-regular/48/appointment-reminders--v2.png" alt="appointment-reminders--v2"/> Notification Preferences</a>
<a class="dropdown-item" href="/helpcentre"> <img width="28" height="28" src="https://www.shutterstock.com/shutterstock/photos/2273439411/display_1500/stock-vector-customer-service-icon-call-center-operator-wearing-headphone-on-white-background-2273439411.jpg" alt="imgcc"> 24x7 Customer Care</a>
<a
class="dropdown-item"
href="https://www.vecteezy.com/png/10158686-trend-icon-sign-symbol-design"
><img width="26" height="16" src="images/vecteezy_trend-icon-sign-symbol-design_10158686.png" alt="img"> Advertise
</a
>
<a
class="dropdown-item"
href="/mobile-apps?otracker=ch_vn_mobile_apps"
> <img width="31" height="23" src= "images/down icon.avif" alt="img3">Download App</a
>
</ul>
</div>
</nav>
<!-- Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<style>
/* Basic reset and styling */
body, h1, h2, p, ul, li {
margin: 0;
padding: 0;
}
body {
font-family: Arial, sans-serif;
}
header, nav, main, footer {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
header {
background-color: #007bff;
color: #fff;
text-align: center;
}
nav ul {
list-style-type: none;
padding: 0;
}
nav ul li {
display: inline;
margin-right: 20px;
cursor: pointer;
color: #007bff;
}
nav ul li:hover {
text-decoration: underline;
}
main {
display: flex;
flex-wrap: wrap;
}
.product {
flex: 1 0 200px;
margin: 10px;
padding: 20px;
border: 1px solid #ddd;
text-align: center;
}
.product img {
width: 100%;
max-width: 150px;
height: auto;
margin-bottom: 10px;
}
footer {
background-color: #f8f9fa;
color: #333;
text-align: center;
}
</style>
</head>
<body>
<header>
<h1>Flipkart</h1>
</header>
<nav>
<ul>
<li id="sales">Huge Sales</li>
<!-- Add more categories here -->
</ul>
</nav>
<main id="products">
<!-- Products will be displayed here -->
</main>
<footer>
<p>© 2024 Flipkart. All rights reserved.</p>
</footer>
<script>
document.addEventListener("DOMContentLoaded", function() {
const salesButton = document.getElementById('sales');
const productsContainer = document.getElementById('products');
fetchSales(); // Automatically fetch sales items when the page loads
function fetchSales() {
// Simulating fetching items on sale from a database or API
const salesItems = [
{ name: 'Headphones', price: '$20 (50% off)', image: 'https://via.placeholder.com/150' },
{ name: 'Smartwatch', price: '$50 (30% off)', image: 'https://via.placeholder.com/150' },
{ name: 'Backpack', price: '$25 (40% off)', image: 'https://via.placeholder.com/150' }
// Add more items on sale here
];
renderProducts(salesItems);
}
function renderProducts(products) {
productsContainer.innerHTML = ''; // Clear previous content
products.forEach(product => {
const productDiv = document.createElement('div');
productDiv.classList.add('product');
productDiv.innerHTML = `
<img src="${product.image}" alt="${product.name}">
<h2>${product.name}</h2>
<p>${product.price}</p>
`;
productsContainer.appendChild(productDiv);
});
}
});
</script>
</body>
</html>