-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnut.html
More file actions
264 lines (248 loc) · 8.34 KB
/
nut.html
File metadata and controls
264 lines (248 loc) · 8.34 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nuts</title>
<!--Box Icons-->
<link href='https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css' rel='stylesheet'>
<!--link swipper-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css" />
<!-- main styles -->
<link rel="stylesheet" href="style.css">
<style>
:root{
--green-color: #3cb815;
}
.head {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 100px;
margin-left: 100px;
}
.head h1 {
font-size: 1.6rem;
font-weight: 600;
}
.head span {
color : var(--green-color);
}
/* centrer le bouton */
.load-more-wrapper {
display: flex;
justify-content: center;
margin: 1.5rem 0 3rem;
}
.btn.load-more {
padding: 0.6rem 1.2rem;
max-width: 180px;
}
/* cacher les éléments marqués */
.products-conatiner .box.hidden {
display: none;
}
</style>
</head>
<body>
<!--navbar-->
<header>
<a href="#" class="logo"><i class="bx bx-basket bx-flip-horizontal bx-tada bx-rotate-90" ></i>Shop</a>
<div class="bx bx-menu" id="menu-icon"></div>
<ul class="navbar">
<li><a href="index.html" class="home-active">Home</a></li>
<li><a href="#categories">Categories</a></li>
<li><a href="#products">Products</a></li>
<li><a href="#about">About</a></li>
<li><a href="#customers">Customers</a></li>
</ul>
<div class="profile">
<img src="img/profile.jpg" alt="">
<span>Karim Guidara</span>
<i class="bx bx-caret-down bx-tada " ></i>
</div>
</header>
<!--Fruit section-->
<div class="head" id="fruit">
<h1> our popular <br><span>Fresh Nuts</span></h1>
</div>
<section class="products" id="products">
<!--Product Content-->
<div class="products-conatiner">
<!--box 1-->
<div class="box">
<img src="img/nut1.jpg" alt="">
<span>Fresh Items</span>
<h2>Farm fresh organic <br>Pistachio 150g</h2>
<h3 class="price">$3.99 <span>/Kg</span></h3>
<i class="bx bx-cart-alt " ></i>
<i class='bx bx-heart' ></i>
<span class="discount">-3%</span>
</div>
<!--box 2-->
<div class="box">
<img src="img/nut2.jpg" alt="">
<span>Fresh Items</span>
<h2>Farm fresh organic <br> Almond 350g</h2>
<h3 class="price">$11.93 <span>/Kg</span></h3>
<i class='bx bx-cart-alt' ></i>
<i class='bx bx-heart' ></i>
<span class="discount">-9%</span>
</div>
<!--box 3-->
<div class="box">
<img src="img/nut3.jpg" alt="">
<span>Fresh Items</span>
<h2>Farm fresh organic <br>Dried Lemon 700g</h2>
<h3 class="price">$15 <span>/Kg</span></h3>
<i class='bx bx-cart-alt' ></i>
<i class='bx bx-heart' ></i>
<span class="discount">-23%</span>
</div>
<!--box 4-->
<div class="box">
<img src="img/nut4.jpg" alt="">
<span>Fresh Items</span>
<h2>Farm fresh organic <br>Hazelnut 400g</h2>
<h3 class="price">$18.25 <span>/Kg</span></h3>
<i class='bx bx-cart-alt' ></i>
<i class='bx bx-heart' ></i>
<span class="discount">-6%</span>
</div>
<!--box 5-->
<div class="box">
<img src="img/nut5.jpg" alt="">
<span>Fresh Items</span>
<h2>Farm fresh organic <br> Cashew 200g</h2>
<h3 class="price">$6.78 <span>/Kg</span></h3>
<i class='bx bx-cart-alt' ></i>
<i class='bx bx-heart' ></i>
<span class="discount">-10%</span>
</div>
<!--box 6-->
<div class="box">
<img src="img/nut6.jpg" alt="">
<span>Fresh Items</span>
<h2>Farm fresh organic <br>Raspberry 500g</h2>
<h3 class="price">$22 <span>/Kg</span></h3>
<i class='bx bx-cart-alt' ></i>
<i class='bx bx-heart' ></i>
<span class="discount">-26%</span>
</div>
<!--box 7-->
<div class="box">
<img src="img/nut7.jpg" alt="">
<span>Fresh Items</span>
<h2>Farm fresh organic <br>Peanut 300g</h2>
<h3 class="price">$10.64 <span>/Kg</span></h3>
<i class='bx bx-cart-alt' ></i>
<i class='bx bx-heart' ></i>
<span class="discount">-23%</span>
</div>
<!--box 8-->
<div class="box">
<img src="img/nut8.jpg" alt="">
<span>Fresh Items</span>
<h2>Farm fresh organic <br>Acorn 320g</h2>
<h3 class="price">$12.21<span>/Kg</span></h3>
<i class='bx bx-cart-alt' ></i>
<i class='bx bx-heart' ></i>
<span class="discount">-9%</span>
</div>
<!--box 9-->
<div class="box">
<img src="img/nut9.jpg" alt="">
<span>Fresh Items</span>
<h2>Farm fresh organic <br>Brazil nut 250g</h2>
<h3 class="price">$22.12 <span>/Kg</span></h3>
<i class='bx bx-cart-alt' ></i>
<i class='bx bx-heart' ></i>
<span class="discount">-5%</span>
</div>
<!--box 10-->
<div class="box">
<img src="img/nut10.jpg" alt="">
<span>Fresh Items</span>
<h2>Farm fresh organic <br>Sunflower seed 420g</h2>
<h3 class="price">$19.94 <span>/Kg</span></h3>
<i class='bx bx-cart-alt' ></i>
<i class='bx bx-heart' ></i>
<span class="discount">-3%</span>
</div>
</div>
</section>
<div class="load-more-wrapper">
<button id="loadMore" class="btn load-more">Load more</button>
</div>
<!--Footer-->
<section class="footer" id="footer">
<div class="footer-box">
<a href="#" class="logo"><i class="bx bx-basket bx-flip-horizontal bx-tada bx-rotate-90" ></i>Shop</a>
<p>GymVast , 50th Street ,4th <br>Floor ,NYC 10022</p>
<div class="social">
<a href="#"><i class='bx bxl-facebook'></i></a>
<a href="#"><i class='bx bxl-twitter'></i></a>
<a href="#"><i class='bx bxl-instagram'></i></a>
<a href="#"><i class='bx bxl-youtube'></i></a>
</div>
</div>
<div class="footer-box">
<h2>Categories</h2>
<a href="#">Fruits & Vegetables</a>
<a href="#">Dairy Products</a>
<a href="#">Package Food</a>
<a href="#">Bevarage</a>
</div>
<div class="footer-box">
<h2>Useful Links</h2>
<a href="#">Payement & Tax</a>
<a href="#">Terms Of Use</a>
<a href="#">My Blog</a>
<a href="#">Return Policy</a>
</div>
<div class="footer-box">
<h2>Newsletter</h2>
<p>Get 10% Discount with <br> Email Newsletter</p>
<form action="">
<i class="bx bxs-envelope bx-beat "></i>
<input type="email" name="" id="" placeholder="Enter Your Email">
<i class='bx bx-arrow-back bx-rotate-180 '></i>
</form>
</div>
</section>
<div class="copyright">
<p>© CarpoolVenom All Right Reserved.</p>
</div>
<script>
// Script simple pour révéler les produits par lots
(function(){
const boxes = Array.from(document.querySelectorAll('.products-conatiner .box'));
const initial = 6; // nombre affiché au départ
const step = 4; // nombre à ajouter par clic
const btn = document.getElementById('loadMore');
// cacher ceux après initial
boxes.forEach((b, i) => {
if (i >= initial) b.classList.add('hidden');
});
// si pas de contenu caché, cacher le bouton
if (boxes.length <= initial) {
btn.style.display = 'none';
}
function update() {
const hidden = boxes.filter((b, i) => i >= initial && b.classList.contains('hidden'));
if (hidden.length === 0) btn.style.display = 'none';
}
btn.addEventListener('click', () => {
const hiddenBoxes = boxes.filter(b => b.classList.contains('hidden'));
for (let i = 0; i < Math.min(step, hiddenBoxes.length); i++) {
hiddenBoxes[i].classList.remove('hidden');
}
update();
// smooth scroll vers le premier nouvel élément affiché (optionnel)
const firstNew = boxes.find((b, idx) => idx >= initial && !b.classList.contains('hidden'));
if (firstNew) firstNew.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
});
})();
</script>
</body>
</html>