-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcook_temp.html
159 lines (156 loc) ยท 5.33 KB
/
cook_temp.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Food Safety</title>
</head>
<link rel="stylesheet" href="../css/style.css">
<style>
body {
font-family: system-ui, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
h1 {
/* background-color: lemonchiffon; */
margin: 0;
/* border: solid darkcyan 8px; */
}
h3 {
/* border: solid 4px; */
/* background-color: aquamarine; */
border-radius: .5rem;
padding: .3rem .5rem;
}
h4, h5 {
/* background-color: lavender; */
/* border: solid tomato 6px; */
margin: 0;
}
form {
border: 3px solid green;
padding: 0rem 1rem;
margin: .5rem 1.5rem;
margin-top: 2.5rem;
/* background-color: pink; */
}
div {
border: 3px solid red;
margin: .5rem 1.5rem;
padding: 0 1em;
}
#Temperature {
padding: 0 1em;
}
#Result {
visibility: hidden;
}
</style>
<script>
var foods = {
"๐ Beef, ๐ฆฌ Bison, ๐ฎ Veal, ๐ Goat, and ๐ Lamb": {
"๐ฅฉ Steaks, roasts, chops": ["Internal Temperature: 145โ, Rest time: 3 minutes"],
"๐ญ Ground meat and sausage": ["Internal Temperature: 160โ"],
},
"๐ฅ Casseroles": {
"๐ฅ Meat and meatless": ["Internal Temperature: 165โ"],
},
"๐ Chicken, turkey, and other poultry": {
"๐ All: whole bird, breasts, legs, thighs, wings, ground poultry, giblets, sausage, and stuffing inside poultry": ["Internal Temperature: 165โ"],
},
"๐ฅ Eggs": {
"๐ณ Raw eggs": ["Cook until yolk and white are firm"],
"๐ฅฎ Egg dishes (such as frittata, quiche)": ["Internal Temperature: 160โ"],
},
"๐ Ham": {
"๐ฝ Raw ham": ["Internal Temperature: 145โ, Rest time: 3 minutes"],
"๐ท Precooked ham (to reheat)": ["Internal Temperature: 165โ, Note: Reheat cooked hams packaged in USDA-inspected plants to 140โ"],
},
"๐ฏ Leftovers": {
"๐ฏ Any type": ["Internal Temperature: 165โ"],
},
"๐ท Pork": {
"๐ฅฉ Steaks, roasts, chops": ["Internal Temperature: 145โ, Rest time: 3 minutes"],
"๐ญ Ground meat and sausage": ["Internal Temperature: 160โ"],
},
"๐ฐ Rabbit and venison": {
"๐ Wild or farm-raised": ["Internal Temperature: 160โ"],
},
"๐ฃ Seafood": {
"๐ Fish (whole or filet), such as salmon, tuna, tilapia, pollock, bass, cod, catfish, trout, etc.": ["Internal Temperature: 145โ or cook until flesh is no longer translucent and separates easily with a fork"],
"๐ค Shrimp, lobster, crab, and scallops": ["Cook until flesh is pearly or white, and opaque"],
"๐ฆช Clams, oysters, mussels": ["Cook until shells open during cooking"],
},
}
window.onload = function() {
var groupSel = document.getElementById("group");
var typeSel = document.getElementById("type");
var tempSel = document.getElementById("temp");
for (var x in foods) {
groupSel.options[groupSel.options.length] = new Option(x, x);
}
groupSel.onchange = function() {
// document.getElementById("Category").style.visibility = 'visible';
document.getElementById("Result").style.visibility = 'visible';
//get food group selection
var groupSel = document.getElementById("group");
//get selected type
var typeSel = document.getElementById("type");
//reset types
typeSel.length = 1;
//add types for group
for (var y in foods[this.value]) {
typeSel.options[typeSel.options.length] = new Option(y, y);
}
var typeSel = document.getElementById("type");
typeSel.remove(typeSel[1]);
//get the temp from foods
var temp = foods[groupSel.value][typeSel.value];
var tempP = document.getElementById("temp");
tempP.innerHTML = temp[0];
}
typeSel.onchange = function() {
document.getElementById("Result").style.visibility = 'visible';
var typeSel = document.getElementById("type");
var tempP = document.getElementById("temp");
// typeSel.length = 1;
var temp = foods[groupSel.value][typeSel.value];
tempP.innerHTML = temp[0];
}
}
</script>
<body>
<nav>
<ol>
<li><a href="..">github root index</a></li>
<li><a href="cook_temp.html">cook_temp/cook_temp.html</a></li>
</ol>
</nav>
<h1>Safe Minimum Internal Temperature for Cooking ๐งโ๐ณ</h1>
<h4>Website by Zack Ebenfeld ๐๐ป</h4>
<h5>Created 09/06/2022</h5>
<form name="form1" id="form1" action="/action_page.php">
<h3>1. Choose Food to Cook ๐ฝ</h3>
<p>
<label for="group">Food Category:</label>
<select name="group" id="group">
<option value="" selected="selected">
Select Food Category
</option>
</select>
</p>
<p>
<label for="type">Food Item: </label>
<select name="type" id="type">
<option value="" selected="selected">
Select Food Category First
</option>
</select>
</p>
</form>
<div id="Result">
<h3>2. See Below for Cooking Safety Information</h3>
<h4><p id="Temperature"><a name="temp" id="temp"></a></p></h4>
</div>
<p>Source: <a href="https://www.foodsafety.gov/food-safety-charts/safe-minimum-internal-temperatures" target="_blank">FoodSafety.gov</a></p>
<p><a href="../index.html">Back to main page</a></p>
</body>
</html>