-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex1.html
465 lines (457 loc) · 20.3 KB
/
index1.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
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nutrition Diet</title>
<!-- <link rel="stylesheet" href="styles1.css"> -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
<style>
@import url('https://fonts.googleapis.com/css2?family=Barriecito&display=swap');
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #000000 !important;
color: #fff !important;
}
.title{
text-align: center;
padding-top: 70px;
font-size: 70px;
}
#hom img{
width: 500px;
height: 400px;
padding-top: 50px;
padding-left: 50px;
padding-right: -500px!important;
text-align: right !important;
}
.images{
padding-top: 110px;
}
span {
content: "\27F0";
font-size: 1.5em
}
.navbar-nav .nav-link:hover {
font-size: 1.2em;
transition: font-size 0.3s;
}
.navbar {
position: fixed !important;
top: 0;
left: 0;
width: 100%;
z-index: 1000;
transition: background-color 0.3s ease;
}
.navbar:hover {
background-color:#91c6d5 !important;
text-decoration: #184770;
}
.container{
padding-top: 120px;
}
.card-title{
font-size:4.5em;
font-weight: bold;
font-family: "Barriecito", system-ui;
font-weight: 800;
font-style: normal;
}
.card a{
color: #000000 ;
text-decoration: none;
font-size: 20px;
margin-bottom: 20px;
margin-left: 40px;
}
.card a:hover{
color: #000000;
font-weight: 700;
}
.recommendation{
padding-bottom: 80px;
}
.recommendation h2{
padding-bottom: 30px !important;
padding-top: 10px;
font-size: 40px;
}
form
{
max-width: 500px;
margin: 0 auto;
background-color: #294b44;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
#h20 {
margin-top: 50px;
}
label {
display: inline-block; /* Change display to inline-block */
width: 170px; /* Add fixed width to the labels */
margin-bottom: 8px;
color: black;
}
input,
select {
width: 100%;
padding: 10px;
margin-bottom: 15px;
box-sizing: border-box;
border: 2px solid #175b1d;
border-radius: 5px;
font-size: 16px;
}
input[type="submit"] {
background-color: #00fff2;
color: #000000;
cursor: pointer;
font-size: 18px;
font-weight: bold;
}
input[type="submit"]:hover {
background-color: #18bbad;
}
.form-part {
width: 48%;
float: left;
margin-right: 2%;
}
.form-part:last-child {
margin-right: 0;
}
@media (max-width: 600px) {
.form-part {
width: 100%;
float: none;
margin-right: 0;
}
}
.contact-details {
margin-top: 30px;
background: #343a40;
color: #fff;
border-radius: 30px;
}
.contact-details h3 {
color: #007bff;
font-weight:bolder;
}
footer {
background-color: #343a40;
color: #fff;
text-align: center!important;
}
</style>
</head>
<body>
<header>
<nav class="navbar navbar-expand-lg navbar-light bg-light" id="navbar">
<div class="container-fluid">
<a class="navbar-brand" href=""><span>⟰</span></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-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 ml-auto">
<li class="nav-item">
<a class="nav-link" href="#home"><b>Home</b></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#services"><b>About</b></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#recommendation"><b>Recommendation</b></a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<main>
<h1 class="title">Importance of Nutrition</h1>
<section class="container" id="home">
<div class="row">
<div class="col-md-6">
<h1>Understand Nutrition</h1>
<p>Eating nutritious food is the foundation of a healthy body, mind, and life.</p>
<p>Eating nutritious food is like giving your body the right tools to stay strong and healthy. Just like a car needs good fuel to run smoothly, our bodies need good food to work well.</p>
<p>Nutritious Foods are packed with the good stuff our bodies need to grow, be active, and fight off sickness. They include fruits, vegetables, whole grains, lean proteins like chicken or beans, and healthy fats like those found in nuts and avocados.</p>
<p>Nutritious Diet is all about having a balanced mix of these nutritious foods every day. It's like having a colorful plate where you fill it up with lots of different fruits and veggies, some grains for energy, a bit of protein to keep you strong, and a little healthy fat for your brain and skin.</p>
<a href="index3.html" class="btn btn-primary">Get Recommended</a>
</div>
<div class="col-md-6" id="hom">
<img src="https://www.chp.gov.hk/files/jpg/adult_eng.jpg" alt="food" class="img-fluid">
</div>
</div><br>
</section>
<div class="images" id="services">
<div class="row row-cols-1 row-cols-md-3 g-4">
<div class="col">
<div class="card">
<img src="https://static.langimg.com/thumb/97521866/eisamay-97521866.jpg?width=380&height=285&resizemode=75" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Vitamins</h5>
<p class="card-text">
<ul>
<li><b>Function:</b> Vitamins are organic compounds that are essential for various metabolic processes in the body. They play crucial roles in growth, immune function, energy production, and overall health.</li>
<li><b>Types:</b> Vitamins are classified into two categories: fat-soluble vitamins (A, D, E, and K) and water-soluble vitamins (vitamin C and B vitamins).</li>
<li><b>Sources:</b> Vitamins can be obtained from a balanced diet that includes a variety of fruits, vegetables, whole grains, nuts, seeds, dairy products, and lean proteins.</li>
</ul>
</p>
</div>
<a href="/index3">learn more</a>
</div>
</div>
<div class="col">
<div class="card">
<img src="https://media.istockphoto.com/id/1296030180/photo/composition-with-high-protein-food.jpg?s=612x612&w=0&k=20&c=DJDYM9qte_Mz04jh-YsjQg6va8ht_PKbMV1yhndRdvs=" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Proteins</h5>
<p class="card-text">
<ul>
<li><b>Function:</b> Proteins are the building blocks of the body and are essential for building and repairing tissues, supporting immune function, producing hormones and enzymes, and maintaining healthy muscles, bones, skin, and hair.</li>
<li><b>Types:</b> Proteins are made up of amino acids, which are classified into essential amino acids (those that the body cannot produce and must be obtained from the diet) and non-essential amino acids (those that the body can produce).</li>
<li><b>Sources:</b> Protein-rich foods include meat, poultry, fish, eggs, dairy products, tofu, tempeh, legumes, nuts, and seeds.</li>
</ul>
</p>
</div>
<a href="/index3">learn more</a>
</div>
</div>
<div class="col">
<div class="card">
<img src="https://thumbs.dreamstime.com/b/food-sources-omega-unsaturated-healthy-fats-concept-healthy-food-keto-ketogenic-diet-food-sources-omega-150645835.jpg" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">FAts</h5>
<p class="card-text">
<ul>
<li><b>Function:</b> Fats are essential for various bodily functions, including providing energy, supporting cell growth, protecting organs, and aiding in the absorption of fat-soluble vitamins. Healthy fats also play a role in hormone production and maintaining healthy skin and hair.</li>
<li><b>Types:</b> Fats are classified into saturated fats, unsaturated fats (monounsaturated and polyunsaturated), and trans fats.</li>
<li><b>Sources:</b> Healthy fats are found in foods such as avocados, nuts, seeds, olive oil, fatty fish, and coconut oil. Saturated fats are found in animal products, while trans fats are often found in processed and fried foods.</li>
</ul>
</p>
</div>
<a href="/index3">learn more</a>
</div>
</div>
<div class="col">
<div class="card">
<img src="https://t4.ftcdn.net/jpg/02/81/29/83/360_F_281298312_9Z8jYYNFGVsk0mcjPBfcp9uxsuj1rK8q.jpg" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Carbohydrates</h5>
<p class="card-text">
<ul>
<li><b>Function:</b> Carbohydrates are the body's primary source of energy. They are broken down into glucose, which is used by the cells for fuel. Carbohydrates also play a role in supporting brain function and providing fiber for digestive health.</li>
<li><b>Types:</b> Carbohydrates are classified as simple carbohydrates (sugars) and complex carbohydrates (starches and fiber).</li>
<li><b>Sources:</b> Carbohydrates are found in foods such as grains (rice, bread, pasta), fruits, vegetables, legumes, dairy products, and sweets.</li>
</ul>
</p>
</div>
<a href="/index3">learn more</a>
</div>
</div>
<div class="col">
<div class="card">
<img src="https://t4.ftcdn.net/jpg/01/33/04/21/360_F_133042187_Y2nuSQtmwuIJfhiYivuhJkbXWEeRsUbH.jpg" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Fiber</h5>
<p class="card-text">
<ul>
<li><b>Function:</b> Fiber is a type of carbohydrate that the body cannot digest. It is essential for digestive health, promoting regular bowel movements, preventing constipation, and reducing the risk of certain diseases such as heart disease and type 2 diabetes.</li>
<li><b>Types:</b> Fiber is classified into two main types: soluble fiber, which dissolves in water and can help lower cholesterol levels, and insoluble fiber, which adds bulk to the stool and helps prevent constipation.</li>
<li><b>Sources:</b> Fiber-rich foods include fruits, vegetables, whole grains, legumes, nuts, and seeds.</li>
</ul>
</p>
</div>
<a href="/index3">learn more</a>
</div>
</div>
<div class="col">
<div class="card">
<img src="https://www.fitpaa.com/wp-content/uploads/2023/06/Untitled-design-2023-06-30T153149.815.jpg" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title"style="margin-top: 50px">Minerals</h5>
<p class="card-text">
<ul>
<li><b>Function:</b> Minerals are inorganic nutrients that are essential for various bodily functions, including bone health, muscle function, nerve transmission, and fluid balance.</li>
<li><b>Types:</b> Minerals are categorized into two groups: macro minerals (required in larger amounts) and trace minerals (needed in smaller amounts).</li>
<li><b>Sources:</b> Minerals can be found in a wide range of foods, including fruits, vegetables, whole grains, dairy products, meat, fish, nuts, and seeds.</li>
</ul>
</p>
</div>
<a href="/index3">learn more</a>
</div>
</div>
</div>
</div>
<!-- Contact Section ----------------->
<!-- <div id="contact">
<div class="contact-details" align="center">
<h3>CONTACT DETAILS</h3>
<p><b><u>Email</u>:</b> info@example.com</p>
<p><b><u>Phone</u>:</b> +1 123-456-7890</p>
<p><b><u>Address</u>:</b> 123 Nutrition Street, Cityville</p><br>
</div> -->
</div>
<div class="recommendation">
<div id="recommendation">
<br><br><br>
<h2 id="h2o" align="center" style="margin-bottom: 20px;"><span style="color: rgb(26, 186, 200);text-shadow: 2px 2px 2px #ffffff;"><b>Enter Your Details</span></h2>
<form action="/process_form1" method="post">
<div class="form-part">
<label for="name"><b>Name:</b></label>
<input type="text" name="name" required>
<label for="email"><b>Email:</b></label>
<input type="email" name="email" required>
<label for="height"><b>Height:</b></label>
<input type="number" name="height" required>
<label for="gender"><b>Gender:</b></label>
<select name="gender" required>
<option value="None">Select one</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Transgender">Transgender</option>
</select>
</div>
<div class="form-part">
<label for="age"><b>Age:</b></label>
<select name="age" required>
<option value="None">Select one</option>
<option value="5-12">5-12</option>
<option value="13-19">13-19</option>
<option value="20-35">20-35</option>
<option value="36-50">36-50</option>
<option value="50-100">50-100</option>
</select>
<label for="weight"><b>Weight:</b></label>
<input type="number" name="weight" required>
<label for="nutrition"><b>Required nutrition:</b></label>
<select name="nutrition_required" id="nutrition_required" onchange="updateDetailOptions(this)" required>
<option value="None">Select one</option>
<option value="vitamins">Vitamins</option>
<option value="minerals">Minerals</option>
<option value="amino_acids">Amino Acids</option>
<!-- <option value="fats">Fats</option> -->
</select>
<label for="detail"><b>Detail:</b></label>
<select name="detail" id="detail" required>
<option value="None">Select nutrition required first</option>
</select>
</div>
<input type="submit" value="Submit" onclick="submitForm()" style="margin: 30px auto; display: block;">
</form>
</div>
</div>
</main>
<!-- Footer Section -->
<footer class="mt-4">
<div>
<p>© 2024 DIET RECOMMENDATION</p>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
// Get all anchor tags inside the navbar
var links = document.querySelectorAll("#navbar .nav-link");
// Add click event listeners to all anchor tags
links.forEach(function(link) {
link.addEventListener("click", function() {
// Check if the navbar is collapsed
if (document.querySelector("#navbarNav").classList.contains("show")) {
// Collapse the navbar
var navbarCollapse = new bootstrap.Collapse(document.querySelector("#navbarNav"));
navbarCollapse.toggle();
}
});
});
});
</script>
<script>
function updateDetailOptions(selectElement) {
var detailSelect = document.getElementById("detail");
detailSelect.innerHTML = ""; // Clear existing options
var selectedOption = selectElement.value;
var options = [];
switch(selectedOption) {
case "vitamins":
options = [
"select one",
"Vitamin A (Retinol)",
"Vitamin D (Cholecalciferol)",
"Vitamin E (Tocopherol)",
"Vitamin K (Phylloquinone)",
"Vitamin B1 (Thiamine)",
"Vitamin B2 (Riboflavin)",
"Vitamin B3 (Niacin)",
"Vitamin B5 (Pantothenic Acid)",
"Vitamin B6 (Pyridoxine)",
"Vitamin B7 (Biotin)",
"Vitamin B9 (Folate)",
"Vitamin B12 (Cobalamin)",
"Vitamin C (Ascorbic Acid)"
];
break;
case "minerals":
options = [
"select one",
"Calcium",
"Phosphorus",
"Potassium",
"Sodium",
"Chloride",
"Magnesium",
"Iron",
"Zinc",
"Copper",
"Manganese",
"Selenium",
"Iodine",
"Fluoride",
"Chromium"/*,
"Molybdenum"*/
];
break;
case "amino_acids":
options = [
"select one",
// "Phenylalanine",
// "Valine",
// "Threonine",
"Tryptophan",
"Isoleucine",
"Methionine",
"Leucine",
"Lysine",
"Histidine"/*,
"Arginine (Semi-essential)"*/
];
break;
// case "fats":
// options = [
// "select one",
// "Omega-3 Fatty Acids",
// "Omega-6 Fatty Acids"
// ];
// break;
default:
options = ["Select nutrition required first"];
}
// Add options to the detail select element
options.forEach(function(option) {
var opt = document.createElement("option");
opt.textContent = option;
opt.value = option;
detailSelect.appendChild(opt);
});
}
</script>
</body>
</html>