-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
165 lines (131 loc) · 6.91 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
<!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>Recipe Converter</title>
<script src="https://code.jquery.com/jquery-1.12.1.js"
integrity="sha256-VuhDpmsr9xiKwvTIHfYWCIQ84US9WqZsLfR4P7qF6O8=" crossorigin="anonymous"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
</head>
<body class="container-fluid px-0">
<section class="row justify-content-evenly">
<section class="col-lg-4" id="left-content">
<div>
<h1 class="title">Serving Size Converter</h1>
<p id="introduction">
This page helps you convert the serving sizes of your recipe to the serving sizes you need!
<br>Simply enter the ingredients below:
</p>
<form id="ingredient" action="" method="GET">
<table id="tbl">
<tr>
<td id="rowTag">Ingredient:</td>
<td>
<input name="numberToConvert" type="number" placeholder="400" required>
</td>
<td>
<div>
<select name="originalUnit" id="originalUnit">
<option value="N/A">N/A</option>
<option value="mL">mL</option>
<option value="L">L</option>
<option value="oz">oz</option>
<option value="g">g</option>
<option value="kg">kg</option>
<option value="lb">lb</option>
</select>
</div>
</td>
<td>
<div>
<input id="ingredientData" name="ingredient" type="text" placeholder="milk"
required>
</div>
</td>
<td>
convert to
<select name="convertedUnit" id="convertedUnit">
<option value="N/A">N/A</option>
<option value="mL">mL</option>
<option value="L">L</option>
<option value="oz">oz</option>
<option value="g">g</option>
<option value="kg">kg</option>
<option value="lb">lb</option>
</select>
</td>
</tr>
<tr>
<td id="rowTag">Ingredient:</td>
<td>
<input name="numberToConvert" type="number" placeholder="6">
</td>
<td>
<div>
<select name="originalUnit" id="originalUnit">
<option value="N/A">N/A</option>
<option value="mL">mL</option>
<option value="L">L</option>
<option value="oz">oz</option>
<option value="g">g</option>
<option value="kg">kg</option>
<option value="lb">lb</option>
</select>
</div>
</td>
<td>
<div>
<input id="ingredientData" name="ingredient" type="text" placeholder="eggs">
</div>
</td>
<td>
convert to
<select name="convertedUnit" id="convertedUnit">
<option value="N/A">N/A</option>
<option value="mL">mL</option>
<option value="L">L</option>
<option value="oz">oz</option>
<option value="g">g</option>
<option value="kg">kg</option>
<option value="lb">lb</option>
</select>
</td>
</tr>
</table>
<div>
<button class="btn btn-outline-primary add_another">Add another line</button>
</div>
<div>
<label for="originalServing">Convert from</label>
<input name="originalServing" id="originalServing" type="number" placeholder="2" required>
<label for="currentServing">servings to</label>
<input name="currentServing" id="currentServing" type="number" placeholder="1" required>
<label for="currentServing">serving(s)</label>
</div>
<div>
<button class="btn btn-outline-primary" type="submit">Let's cook!</button>
<button class="btn btn-outline-primary" type="reset" onclick="deleteResult()">Cook another
one</button>
</div>
</form>
</div>
</section>
<section class="col-lg-4" id="right-content">
<div id="resultTable">
</div>
</section>
</section>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"></script>
<script src="script.js"></script>
</body>
</html>