-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
382 lines (367 loc) · 14.3 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="Better understand your weight in relation to your height using our body mass index (BM) calculator. While BMI is not the sole determinant
of a healthy weight, it offers a valuable starting point to evaluate your overall health and well-being."
/>
<!-- Link CSS stylesheet -->
<link rel="stylesheet" href="/src/css/style.css" />
<!-- Link javascript file -->
<script type="module" src="/src/js/main.js"></script>
<!-- Favicon -->
<link
rel="apple-touch-icon"
sizes="180x180"
href="/assets/favicon/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/assets/favicon/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/assets/favicon/favicon-16x16.png"
/>
<link rel="manifest" href="/assets/favicon/site.webmanifest" />
<!-- Page Title -->
<title>Health Hero</title>
</head>
<body>
<!-- Header -->
<header>
<div class="health-hero__logo-wrapper">
<a href="#" class="health-hero__logo" aria-label=" health hero logo">
<img src="assets/images/logo.svg" alt="" aria-hidden="true" />
</a>
</div>
</header>
<!-- main -->
<main>
<!-- Calculate result section -->
<section class="calculate-result">
<div class="container">
<!-- BMI description -->
<div class="bmi-description">
<h1 class="bmi-description__heading">Body Mass Index Calculator</h1>
<p class="bmi-description__paragraph">
Better understand your weight in relation to your height using our
body mass index (BMI) calculator. While BMI is not the sole
determinant of a healthy weight, it offers a valuable starting
point to evaluate your overall health and well-being.
</p>
</div>
<!-- BMI calculator and Result display -->
<div class="bmi-component">
<!-- BMI calculator -->
<form>
<fieldset>
<legend>Enter your details below</legend>
<!-- BMI units. Select preferred unit -->
<div class="units">
<div class="unit-metric">
<input
type="radio"
id="metric"
name="unit"
aria-controls="metric-inputs"
value="metric"
checked
/>
<label for="metric">Metric</label>
</div>
<div class="unit-imperial">
<input
type="radio"
id="imperial"
name="unit"
value="imperial"
aria-controls="imperial-inputs"
/>
<label for="imperial">Imperial</label>
</div>
</div>
<!-- BMI metric unit inputs -->
<div id="metric-inputs" class="metric-inputs active">
<!-- BMI metric unit height input -->
<div class="metric-height">
<label for="height-in-cm">Height</label>
<input
inputmode="numeric"
type="text"
id="height-in-cm"
name="height"
placeholder="0"
aria-errormessage="error-message-cm"
/>
<p class="si-unit">cm</p>
<p aria-live="polite" id="error-message-cm" hidden></p>
</div>
<!-- BMI metric unit weight input -->
<div class="metric-weight">
<label for="weight-in-kg">Weight</label>
<input
inputmode="numeric"
type="text"
id="weight-in-kg"
name="weight"
placeholder="0"
aria-errormessage="error-message-kg"
/>
<p class="si-unit">kg</p>
<p aria-live="polite" id="error-message-kg" hidden></p>
</div>
</div>
<!-- BMI imperial unit inputs -->
<div id="imperial-inputs" class="imperial-inputs">
<!-- BMI imperial unit height input -->
<p id="height">Height</p>
<div class="imperial-height" aria-labelledby="height">
<div class="feet">
<label for="height-in-feet" class="sr-only">feet</label>
<input
inputmode="numeric"
type="text"
id="height-in-feet"
name="feet"
aria-errormessage="error-message-ft"
placeholder="0"
/>
<p class="si-unit">ft</p>
<p aria-live="polite" id="error-message-ft"></p>
</div>
<div class="inches">
<label for="height-in-inches" class="sr-only"
>inches</label
>
<input
inputmode="numeric"
type="text"
id="height-in-inches"
name="inches"
aria-errormessage="error-message-in"
placeholder="0"
/>
<p class="si-unit">in</p>
<p aria-live="polite" id="error-message-in" hidden></p>
</div>
</div>
<!-- BMI imperial unit weight input -->
<p id="weight">Weight</p>
<div class="imperial-weight" aria-labelledby="weight">
<div class="stone">
<label class="sr-only" for="weight-in-stone">stone</label>
<input
inputmode="numeric"
type="text"
id="weight-in-stone"
name="stone"
aria-errormessage="error-message-st"
placeholder="0"
/>
<p class="si-unit">st</p>
<p aria-live="polite" id="error-message-st" hidden></p>
</div>
<div class="pounds">
<label class="sr-only" for="weight-in-pounds"
>pounds</label
>
<input
inputmode="numeric"
type="text"
id="weight-in-pounds"
name="pounds"
aria-errormessage="error-message-lbs"
placeholder="0"
/>
<p class="si-unit">lbs</p>
<p aria-live="polite" id="error-message-lbs" hidden></p>
</div>
</div>
</div>
</fieldset>
</form>
<!-- Result display -->
<div class="display-result">
<p><strong>Welcome!</strong></p>
<p>
Enter your height and weight and you’ll see your BMI result here
</p>
</div>
</div>
</div>
</section>
<!-- The about result section -->
<section class="about-result">
<div class="container">
<figure class="image-wrapper">
<img
src="./assets/images/image-man-eating.webp"
alt="a man eating sushi"
width="1128"
height="1066"
/>
</figure>
<div class="about-result-description">
<h2 class="about-result-description__heading">
What your BMI result means
</h2>
<p class="about-result-description__text">
A BMI range of 18.5 to 24.9 is considered a 'healthy weight'.
Maintaining a healthy weight may lower your chances of
experiencing health issues later on, such as obesity and type 2
diabetes. Aim for a nutritious diet with reduced fat and sugar
content, incorporating ample fruits and vegetables. Additionally,
strive for regular physical activity, ideally about 30 minutes
daily for five days a week.
</p>
</div>
</div>
</section>
<!-- The tips section -->
<section class="tips">
<div class="tips-background">
<div class="container">
<article class="tip tip-healthy-eating">
<img
src="./assets/images/icon-eating.svg"
alt=""
aria-hidden="true"
/>
<div class="tip-healthy-eating-text">
<h3 class="tip-healthy-eating__heading">Healthy eating</h3>
<p class="tip-healthy-eating__description">
Healthy eating promotes weight control, disease prevention,
better digestion, immunity, mental clarity, and mood.
</p>
</div>
</article>
<article class="tip tip-regular-exercise">
<img
src="./assets/images/icon-exercise.svg"
alt=""
aria-hidden="true"
/>
<div class="tip-healthy-eating-text">
<h3 class="tip-healthy-eating__heading">Regular exercise</h3>
<p class="tip-healthy-eating__description">
Exercise improves fitness, aids weight control, elevates mood,
and reduces disease risk, fostering wellness and longevity.
</p>
</div>
</article>
<article class="tip tip-adequate-sleep">
<img
src="./assets/images/icon-sleep.svg"
alt=""
aria-hidden="true"
/>
<div class="tip-healthy-eating-text">
<h3 class="tip-healthy-eating__heading">Adequate sleep</h3>
<p class="tip-healthy-eating__description">
Sleep enhances mental clarity, emotional stability, and
physical wellness, promoting overall restoration and
rejuvenation.
</p>
</div>
</article>
</div>
</div>
</section>
<!-- The limitations section -->
<section class="limitations">
<div class="container limitations-grid-container">
<div class="limitations-description">
<h2 class="limitations-description__heading">Limitations of BMI</h2>
<p class="limitations-description__text">
Although BMI is often a practical indicator of healthy weight, it
is not suited for every person. Specific groups should carefully
consider their BMI outcomes, and in certain cases, the measurement
may not be beneficial to use.
</p>
</div>
<article class="limitation limitation-gender">
<div>
<img
src="./assets/images/icon-gender.svg"
alt=""
aria-hidden="true"
/>
<h3 class="limitation__heading">Gender</h3>
</div>
<p class="limitation__text">
The development and body fat composition of girls and boys vary
with age. Consequently, a child's age and gender are considered
when evaluating their BMI.
</p>
</article>
<article class="limitation limitation-age">
<div>
<img
src="./assets/images/icon-age.svg"
alt=""
aria-hidden="true"
/>
<h3 class="limitation__heading">Age</h3>
</div>
<p class="limitation__text">
In aging individuals, increased body fat and muscle loss may cause
BMI to underestimate body fat content.
</p>
</article>
<article class="limitation limitation-muscle">
<div>
<img
src="./assets/images/icon-muscle.svg"
alt=""
aria-hidden="true"
/>
<h3 class="limitation__heading">Muscle</h3>
</div>
<p class="limitation__text">
BMI may misclassify muscular individuals as overweight or obese,
as it doesn't differentiate muscle from fat.
</p>
</article>
<article class="limitation limitation-pregnancy">
<div>
<img
src="./assets/images/icon-pregnancy.svg"
alt=""
aria-hidden="true"
/>
<h3 class="limitation__heading">Pregnancy</h3>
</div>
<p class="limitation__text">
Expectant mothers experience weight gain due to their growing
baby. Maintaining a healthy pre-pregnancy BMI is advisable to
minimise health risks for both mother and child.
</p>
</article>
<article class="limitation limitation-race">
<div>
<img
src="./assets/images/icon-race.svg"
alt=""
aria-hidden="true"
/>
<h3 class="limitation__heading">Race</h3>
</div>
<p class="limitation__text">
Certain health concerns may affect individuals of some Black and
Asian origins at lower BMIs than others. To learn more, it is
advised to discuss this with your GP or practice nurse.
</p>
</article>
</div>
</section>
</main>
</body>
</html>