-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
80 lines (80 loc) · 2.44 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="stylesheet" href="src/style.css" />
<link
rel="stylesheet"
href="https://cdn.skypack.dev/snackbar@1/dist/snackbar.min.css"
/>
<title>My Nutrition</title>
</head>
<body>
<nav id="navbar">
<a href="#" class="nav-brand">My Nutrition</a>
</nav>
<div class="container" id="main">
<h2>Add food</h2>
<form id="create-form">
<label for="create-name">Food name:</label>
<select id="create-name">
<option value="">Please select</option>
<!-- these are the only values accepted by the API -->
<option value="pizza">Pizza</option>
<option value="pasta">Pasta</option>
<option value="burger">Burger</option>
<option value="soup">Soup</option>
<option value="salad">Salad</option>
<option value="apple">Apple</option>
<option value="peach">Peach</option>
<option value="cider">Cider</option>
</select>
<div class="nutrition-values">
<label for="create-carbs">Carbs:</label>
<input
class="nutrition-input"
type="number"
id="create-carbs"
min="0"
max="200"
placeholder="0g"
/>
<label for="create-protein">Protein:</label>
<input
class="nutrition-input"
type="number"
id="create-protein"
min="0"
max="200"
placeholder="0g"
/>
<label for="create-fat">Fat:</label>
<input
class="nutrition-input"
type="number"
id="create-fat"
min="0"
max="200"
placeholder="0g"
/>
<div></div>
<input
type="submit"
class="btn btn-default create-submit"
value="Add"
/>
</div>
</form>
<h2>Stats</h2>
<canvas id="app-chart" width="100%"></canvas>
<h2>Log</h2>
<div class="card" id="total-calories-container">
<h3>Total calories logged: <span id="total-calories">0</span></h3>
</div>
<ul id="food-list"></ul>
</div>
<script type="module" src="src//main.js"></script>
</body>
</html>