forked from Albin05/Fitmeals
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlowcal.html
348 lines (294 loc) · 10.8 KB
/
lowcal.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
<!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>Low Cal Sauces - Fitmeals</title>
<link rel="icon" type="image/icon" href="https://foodiefitmeals.com/wp-content/uploads/2019/04/cropped-favicon.png">
<link rel="stylesheet" href="nav.css">
<link href="https://fonts.googleapis.com/css2?family=Catamaran&family=Fira+Sans:wght@700&family=Sacramento&display=swap" rel="stylesheet">
<script src="https://kit.fontawesome.com/cb4c3d70f3.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="footer.css">
<style>
* {
font-family:'Open Sans', sans-serif;
}
body{
margin: 0px;
}
#container{
display: grid;
grid-template-columns: repeat(3,400px);
justify-content: center;
gap: 20px;
width: 100%;
}
@media only screen and (min-width:0px) and (max-width:450px){
#container{
grid-template-columns: repeat(1,400px);
}
}
@media only screen and (min-width:451px) and (max-width:1050px){
#container{
grid-template-columns: repeat(2,400px);
}
}
#heading{
display: flex;
flex-wrap: wrap;
justify-content: center;
width:100%;
height:300px;
background-color: rgb(41,45,53);
}
#heading>h1{
color: white;
padding-top: 120px;
font-size: 50px;
}
body>#heading{
margin-bottom: 100px;
}
.button-anmt{
margin-bottom: 100px;
margin-left: 50px;
width: 200px;
height: 50px;
font-size: 2rem;
border-radius: 20px;
color: white;
background-color: rgb(255, 0, 68);
border: none;
box-shadow:inset 0 0 0 #f9e506;
transition: ease-in-out 0.3s;
outline: none;
}
.button-anmt:hover{
box-shadow: inset 200px 0 0 0 #f9e506 ;
cursor: pointer;
color:#000;
}
#product-img {
box-shadow:rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
transition: 0.2s ease-out;
width: 100%;
}
#product-img:hover{
transform: translateY(20px);
}
h2{
transition: 0.5s;
}
h2:hover{
color: forestgreen;
cursor: pointer;
}
select{
width: 200px;
height: 69px;
border-radius: 30px;
font-size: 15px;
}
#sorted{
display: flex;
justify-content: space-between;
width: 65%;
margin-bottom: 100px;
margin-top: 0;
position: relative;
float: right;
height: 70px;
border-radius: 30px;
background-color: lightgray;
}
.dscrip{
margin-left: 20px;
font-size: 20px;
}
</style>
</head>
<body>
<!-- Navbar start -->
<div class="nav-top">
<div class="left">
<i class="fas fa-map-marker-alt yg"></i>
<p>Food delivery only in Hyderabad</p>
<i class="fas fa-phone-alt yg"></i>
<p>9100347480</p>
<i class="far fa-envelope yg"></i>
<p>[email protected]</p>
</div>
<div class="right">
<i class="fas fa-search focus"></i>
<i class="far fa-user focus" onclick="window.location.href='login_fitmeals.html'"></i>
<i class="fas fa-shopping-bag focus" onclick="window.location.href='cart.html'"></i>
</div>
</div>
<div class="nav-main">
<div class="nav-left">
<img src="https://www.fitmeals.co.in/wp-content/uploads/2019/06/logo-black.png" alt="logo">
</div>
<button class="hamburger" id="hamburger">
<i class="fas fa-bars"></i>
</button>
<div class="nav-mid" id="nav-mid">
<p onclick="window.location.href='home.html'">Home</p>
<div class="dropdown">
<button class="dropbtn">Meal plans ></button>
<div class="dropdown-content">
<a href="#">Weight Loss Meal Plan</a>
<a href="#">Maintenance Meal Plan</a>
<a href="#">Athletic Meal Plan</a>
<a href="#">Keto Meal Plan</a>
<a href="#">Transformation Challenges</a>
</div>
</div>
<p>Health coaching</p>
<div class="dropdown">
<button class="dropbtn">Products ></button>
<div class="dropdown-content">
<a href="prod_01.html">Vegan Sweets</a>
<a href="lowcal.html">Low-Cal Sauces</a>
<a href="#">Nut Butters</a>
<a href="#">Fresh Bakes</a>
</div>
</div>
<p>Blog</p>
<div class="dropdown">
<button class="dropbtn" onclick="window.location.href='aboutUs.html'">About Us ></button>
<div class="dropdown-content">
<a href="#">Our story</a>
<a href="#">FAQ</a>
<a href="#">Testimonials</a>
</div>
</div>
</div>
<div class="nav-right">
<p>Call: 9100347480</p>
</div>
</div>
<!-- Navbar end -->
<div id="heading">
<h1>Low Calorie Sauces</h1></div>
<button class="button-anmt" onclick="window.location.href='cart.html'">Go to Cart</button>
<div id=sorted>
<p>Showing 1–8 results</p>
<select name="" id="PriceSort" onchange="SortPrices()">
<option value="">Default Sorting</option>
<option value="high">High to Low</option>
<option value="low">Low to High</option>
</select>
</div>
<div id="container">
</div>
<footer>
<div id="footer_box">
<div class="social">
<img onclick="window.location.href='card.html'"
src="https://www.fitmeals.co.in/wp-content/uploads/2019/06/logo-white.png">
<p>The Fitmeals culinary team consists of very<br> passionate and skilled chefs.<br> Our team is well
versed in nutrition and all our menus and plans are designed by qualified nutrition experts.</p>
<div class="icon">
<ion-icon name="logo-facebook"></ion-icon>
<ion-icon name="logo-twitter"></ion-icon>
<ion-icon name="logo-instagram"></ion-icon>
</div>
</div>
<div class="explore">
<h3 class="h3color">Explore</h3>
<h6>
<ion-icon name="chevron-forward-outline"></ion-icon>Home
</h6>
</div>
<div class="links">
<h3 class="h3color">Links</h3>
<h6>
<ion-icon name="chevron-forward-outline"></ion-icon>About Us
</h6>
<h6>
<ion-icon name="chevron-forward-outline"></ion-icon>Blog
</h6>
</div>
<div class="contact">
<h3 class="h3color">Contact Us:</h3>
<h5>
<ion-icon name="call-outline"></ion-icon> Call Us:<br>
<h6>9004322729</h6>
</h5>
<h5>
<ion-icon name="mail-outline"></ion-icon> Email Us:<br>
<h6>[email protected]</h6>
</h5>
<h5>
<ion-icon name="location-outline"></ion-icon> Our Location:<br>
<h6>Banjara Hills, Road no.5, Hyderabad</h6>
</h5>
</div>
</div>
<script type="module" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>
</footer>
</body>
</html>
<script>
var cartArr=JSON.parse(localStorage.getItem("CartItems"))||[]
var images=JSON.parse(localStorage.getItem("images"))
displayData(images)
function SortPrices(){
var selected =document.querySelector("#PriceSort").value;
console.log(selected)
if(selected=="high"){
images.sort(function(a,b){
return Number(b.price)-Number(a.price)
})
}
if(selected=="low"){
images.sort(function(a,b){
return Number(a.price)-Number(b.price)
})
}
console.log(images)
displayData(images)
}
function displayData(images){
document.querySelector("#container").innerHTML=""
images.map(function(food){
var div=document.createElement("div")
div.style.boxShadow="rgba(100, 100, 111, 0.2) 0px 7px 29px 0px";
div.style.borderRadius="10px"
var image=document.createElement("img")
image.setAttribute("src",food.image_url)
image.setAttribute("id","product-img")
image.style.borderRadius="10px"
var Name=document.createElement("h2")
Name.textContent=food.name
Name.style.textAlign="center"
var detail=document.createElement("p")
detail.textContent=food.details;
detail.style.textAlign="center"
detail.setAttribute("class","dscrip")
var prices=document.createElement("h3")
prices.textContent= "₹ "+food.price+".00"
prices.style.color="red";
prices.style.textAlign="center"
var btn=document.createElement("button");
btn.textContent="Add TO Cart";
btn.style.marginLeft="120px";
btn.style.fontSize="25px";
btn.setAttribute("class","button-anmt");
btn.addEventListener("click",function(){
addToCart(food);
});
div.append(image,Name,detail,prices,btn)
document.querySelector("#container").append(div);
})
}
function addToCart(food){
cartArr.push(food);
localStorage.setItem("CartItems",JSON.stringify(cartArr))
alert("Added Successfully");
alert.style.borderRadius="100px";
}
</script>
<script src="nav.js"></script>