-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
318 lines (317 loc) · 14.5 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Fruit Shop</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1 class="main-title">Welcome to the Fresh Market</h1>
<div id="search-bar">
<input type="text" id="product-search" placeholder="Search for products...">
<button id="search-button" onclick="searchProducts()">Search</button>
</div>
</header>
<div class="fruits">
<div class="fruit">
<img src="images/apple.jfif" alt="Apple">
<h2>Apple</h2>
<p>2.50 €/Kg</p>
<p>Crispy and delicious apples from the orchard.</p>
<label for="appleQuantity">Quantity:</label>
<input type="number" id="appleQuantity" min="0" value="0">
<button onclick="addToCart('Apple', 2.50, 'appleQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/banana.jfif" alt="Banana">
<h2>Banana</h2>
<p>1.00 €/Kg</p>
<p>Sweet and ripe bananas for a healthy snack.</p>
<label for="bananaQuantity">Quantity:</label>
<input type="number" id="bananaQuantity" min="0" value="0">
<button onclick="addToCart('Banana', 1.00, 'bananaQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/orange.jfif" alt="Orange">
<h2>Orange</h2>
<p>1.50 €/Kg</p>
<p>Fresh and juicy oranges for a Vitamin C boost.</p>
<label for="orangeQuantity">Quantity:</label>
<input type="number" id="orangeQuantity" min="0" value="0">
<button onclick="addToCart('Orange', 1.50, 'orangeQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/pear.jfif" alt="Pear">
<h2>Pear</h2>
<p>2.00 €/Kg</p>
<p>Sweet and juicy pears for a delightful taste.</p>
<label for="pearQuantity">Quantity:</label>
<input type="number" id="pearQuantity" min="0" value="0">
<button onclick="addToCart('Pear', 2.00, 'pearQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/strawberry.jfif" alt="Strawberry">
<h2>Strawberry</h2>
<p>3.00 €/Kg</p>
<p>Red and juicy strawberries for a sweet treat.</p>
<label for="strawberryQuantity">Quantity:</label>
<input type="number" id="strawberryQuantity" min="0" value="0">
<button onclick="addToCart('Strawberry', 3.00, 'strawberryQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/carrot.jfif" alt="Carrot">
<h2>Carrot</h2>
<p>1.20 €/Kg</p>
<p>Fresh and crunchy carrots for a healthy snack.</p>
<label for="carrotQuantity">Quantity:</label>
<input type="number" id="carrotQuantity" min="0" value="0">
<button onclick="addToCart('Carrot', 1.20, 'carrotQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/grape.jfif" alt="Grape">
<h2>Grape</h2>
<p>2.80 €/Kg</p>
<p>Sweet and delicious grapes for a refreshing taste.</p>
<label for="grapeQuantity">Quantity:</label>
<input type="number" id="grapeQuantity" min="0" value="0">
<button onclick="addToCart('Grape', 2.80, 'grapeQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/watermelon.jfif" alt="Watermelon">
<h2>Watermelon</h2>
<p>0.80 €/Kg</p>
<p>Juicy and refreshing watermelon for hot days.</p>
<label for="watermelonQuantity">Quantity:</label>
<input type="number" id="watermelonQuantity" min="0" value="0">
<button onclick="addToCart('Watermelon', 0.80, 'watermelonQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/cherry.jfif" alt="Cherry">
<h2>Cherry</h2>
<p>2.70 €/Kg</p>
<p>Sweet and vibrant cherries for a delightful taste.</p>
<label for="cherryQuantity">Quantity:</label>
<input type="number" id="cherryQuantity" min="0" value="0">
<button onclick="addToCart('Cherry', 2.70, 'cherryQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/pumpkin.jfif" alt="Pumpkin">
<h2>Pumpkin</h2>
<p>1.80 €/Kg</p>
<p>Fresh and hearty pumpkin for a variety of recipes.</p>
<label for="pumpkinQuantity">Quantity:</label>
<input type="number" id="pumpkinQuantity" min="0" value="0">
<button onclick="addToCart('Pumpkin', 1.80, 'pumpkinQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/broccoli.jpg" alt="Broccoli">
<h2>Broccoli</h2>
<p>1.80 €/Kg</p>
<p>Fresh and nutritious broccoli for a healthy diet.</p>
<label for="broccoliQuantity">Quantity:</label>
<input type="number" id="broccoliQuantity" min="0" value="0">
<button onclick="addToCart('Broccoli', 1.80, 'broccoliQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/pineapple.jpg" alt="Pineapple">
<h2>Pineapple</h2>
<p>3.00 €/Kg</p>
<p>Sweet and tropical pineapples for a refreshing snack.</p>
<label for="pineappleQuantity">Quantity:</label>
<input type="number" id="pineappleQuantity" min="0" value="0">
<button onclick="addToCart('Pineapple', 3.00, 'pineappleQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/cucumber.jpg" alt="Cucumber">
<h2>Cucumber</h2>
<p>0.80 €/Kg</p>
<p>Crisp and refreshing cucumbers for salads and snacks.</p>
<label for="cucumberQuantity">Quantity:</label>
<input type="number" id="cucumberQuantity" min="0" value="0">
<button onclick="addToCart('Cucumber', 0.80, 'cucumberQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/potato.jpg" alt="Potato">
<h2>Potato</h2>
<p>1.20 €/Kg</p>
<p>Versatile and delicious potatoes for various dishes.</p>
<label for="potatoQuantity">Quantity:</label>
<input type="number" id="potatoQuantity" min="0" value="0">
<button onclick="addToCart('Potato', 1.20, 'potatoQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/lemon.jpg" alt="Lemon">
<h2>Lemon</h2>
<p>2.00 €/Kg</p>
<p>Zesty and tangy lemons for cooking and beverages.</p>
<label for="lemonQuantity">Quantity:</label>
<input type="number" id="lemonQuantity" min="0" value="0">
<button onclick="addToCart('Lemon', 2.00, 'lemonQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/onion.jpg" alt="Onion">
<h2>Onion</h2>
<p>1.50 €/Kg</p>
<p>Flavorful and aromatic onions for cooking.</p>
<label for="onionQuantity">Quantity:</label>
<input type="number" id="onionQuantity" min="0" value="0">
<button onclick="addToCart('Onion', 1.50, 'onionQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/peach.jpg" alt="Peach">
<h2>Peach</h2>
<p>2.20 €/Kg</p>
<p>Sweet and juicy peaches for a delightful summer treat.</p>
<label for="peachQuantity">Quantity:</label>
<input type="number" id="peachQuantity" min="0" value="0">
<button onclick="addToCart('Peach', 2.20, 'peachQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/cabbage.jpg" alt="Cabbage">
<h2>Cabbage</h2>
<p>1.30 €/Kg</p>
<p>Crisp and crunchy cabbage for salads and coleslaw.</p>
<label for="cabbageQuantity">Quantity:</label>
<input type="number" id="cabbageQuantity" min="0" value="0">
<button onclick="addToCart('Cabbage', 1.30, 'cabbageQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/grapefruit.jpg" alt="Grapefruit">
<h2>Grapefruit</h2>
<p>2.40 €/Kg</p>
<p>Tangy and refreshing grapefruits for a healthy start.</p>
<label for="grapefruitQuantity">Quantity:</label>
<input type="number" id="grapefruitQuantity" min="0" value="0">
<button onclick="addToCart('Grapefruit', 2.40, 'grapefruitQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/kiwi.jpg" alt="Kiwi">
<h2>Kiwi</h2>
<p>3.20 €/Kg</p>
<p>Green and tangy kiwis for a tropical twist.</p>
<label for="kiwiQuantity">Quantity:</label>
<input type="number" id="kiwiQuantity" min="0" value="0">
<button onclick="addToCart('Kiwi', 3.20, 'kiwiQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/tomato.jpg" alt="Tomato">
<h2>Tomato</h2>
<p>1.60 €/Kg</p>
<p>Plump and juicy tomatoes for salads and sauces.</p>
<label for="tomatoQuantity">Quantity:</label>
<input type="number" id="tomatoQuantity" min="0" value="0">
<button onclick="addToCart('Tomato', 1.60, 'tomatoQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/cantaloupe.jpg" alt="Cantaloupe">
<h2>Cantaloupe</h2>
<p>1.90 €/Kg</p>
<p>Sweet and aromatic cantaloupes for a refreshing treat.</p>
<label for="cantaloupeQuantity">Quantity:</label>
<input type="number" id="cantaloupeQuantity" min="0" value="0">
<button onclick="addToCart('Cantaloupe', 1.90, 'cantaloupeQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/avocado.jpg" alt="Avocado">
<h2>Avocado</h2>
<p>2.80 €/Kg</p>
<p>Creamy and nutritious avocados for salads and guacamole.</p>
<label for="avocadoQuantity">Quantity:</label>
<input type="number" id="avocadoQuantity" min="0" value="0">
<button onclick="addToCart('Avocado', 2.80, 'avocadoQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/mango.jpg" alt="Mango">
<h2>Mango</h2>
<p>2.70 €/Kg</p>
<p>Exotic and sweet mangoes for a tropical delight.</p>
<label for="mangoQuantity">Quantity:</label>
<input type="number" id="mangoQuantity" min="0" value="0">
<button onclick="addToCart('Mango', 2.70, 'mangoQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/raspberry.jpg" alt="Raspberry">
<h2>Raspberry</h2>
<p>3.50 €/Punnet</p>
<p>Delicate and flavorful raspberries for desserts and snacking.</p>
<label for="raspberryQuantity">Quantity:</label>
<input type="number" id="raspberryQuantity" min="0" value="0">
<button onclick="addToCart('Raspberry', 3.50, 'raspberryQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/pomegranate.jpg" alt="Pomegranate">
<h2>Pomegranate</h2>
<p>4.00 €/Each</p>
<p>Juicy and antioxidant-rich pomegranates for health-conscious individuals.</p>
<label for="pomegranateQuantity">Quantity:</label>
<input type="number" id="pomegranateQuantity" min="0" value="0">
<button onclick="addToCart('Pomegranate', 4.00, 'pomegranateQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/blackberry.jpg" alt="Blackberry">
<h2>Blackberry</h2>
<p>2.80 €/Punnet</p>
<p>Sweet and juicy blackberries for desserts and smoothies.</p>
<label for="blackberryQuantity">Quantity:</label>
<input type="number" id="blackberryQuantity" min="0" value="0">
<button onclick="addToCart('Blackberry', 2.80, 'blackberryQuantity')">Add to Cart</button>
</div>
<div class="fruit">
<img src="images/cranberry.jpg" alt="Cranberry">
<h2>Cranberry</h2>
<p>3.20 €/Punnet</p>
<p>Tart and antioxidant-packed cranberries for holiday dishes.</p>
<label for="cranberryQuantity">Quantity:</label>
<input type="number" id="cranberryQuantity" min="0" value="0">
<button onclick="addToCart('Cranberry', 3.20, 'cranberryQuantity')">Add to Cart</button>
</div>
</div>
<div class="pagination">
<button id="prevPage" onclick="navigateToPage('prev')"><</button>
<button id="page1Button" onclick="navigateToPage(1)">1</button>
<button id="page2Button" onclick="navigateToPage(2)">2</button>
<button id="page3Button" onclick="navigateToPage(3)">3</button>
<button id="nextPage" onclick="navigateToPage('next')">></button>
</div>
<div id="cart-icon" onclick="openCart()">
<img src="images/cart.png" alt="Carrito de compras">
<span>0</span>
</div>
<div id="cartPopup" class="popup">
<h2>Your Shopping Cart</h2>
<div class="cart" id="cart">
<!-- Shopping cart items will be displayed here -->
</div>
<p>Total: <span id="totalPrice">0.00</span> €</p>
<button id="CloseCart" onclick="closeCart()">Close</button>
</div>
<button onclick="openCart()">View Shopping Cart</button>
<button id="openContactPopup" onclick="openContactPopup()">Contact Us</button>
<div id="contactPopup" class="popup">
<h2>Contact Us</h2>
<form id="contactForm" onsubmit="submitForm(event)">
<label for="contactTitle">Title:</label>
<input type="text" id="contactTitle" name="contactTitle">
<div class="error-message" id="contactTitleError">Please enter a title</div>
<label for="contactEmail">Email:</label>
<input type="email" id="contactEmail" name="contactEmail">
<div class="error-message" id="contactEmailError">Please enter a valid email address</div>
<label for="contactCategory">Category:</label>
<select id="contactCategory" name="contactCategory">
<option value="Search Information">Search Information</option>
<option value="Career query">Career query</option>
<option value="Fruit enquiry">Fruit enquiry</option>
<option value="Improvements">Improvements</option>
<option value="Other">Other</option>
</select>
<label for="contactText">Message:</label>
<textarea id="contactText" name="contactText"></textarea>
<div class="error-message" id="contactTextError">Please enter a message</div>
<button type="submit">Submit</button>
</form>
<button id="closeContactPopup" onclick="closeContactPopup()">Close</button>
</div>
<script src="script.js"></script>
</body>
</html>