forked from suryanshsk/Python-Voice-Assistant-Suryanshsk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Recipes
257 lines (240 loc) · 10.1 KB
/
Recipes
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
#####html#########
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Recipe Selector</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<h1>Recipe Menu</h1>
<label for="recipeType">Choose a type of recipe:</label>
<select id="recipeType" onchange="showRecipes()">
<option value="">Select...</option>
<option value="sweet">Sweet</option>
<option value="hot">Hot</option>
<option value="spicy">Spicy</option>
<option value="Desserts">Desserts</option>
</select>
<div id="recipeList" class="hidden">
<h2>Recipes:</h2>
<ul id="recipes"></ul>
<div id="procedure" class="hidden">
<h3>Procedure:</h3>
<ul id="procedureText"></ul>
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>
####css########
body {
font-family: Arial, sans-serif;
background-color: #f8f8f8;
color: #333;
}
.container {
width: 300px;
margin: 50px auto;
padding: 20px;
background: white;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
label {
display: block;
margin-bottom: 10px;
}
.hidden {
display: none;
}
h2 {
margin-top: 20px;
}
li {
cursor: pointer;
margin: 5px 0;
}
li:hover {
color: blue;
}
######js######
const recipes = {
sweet: {
"Brownies": [
"Preheat your oven to 350°F (175°C).",
"In a bowl, mix 1 cup of melted butter with 2 cups of sugar.",
"Stir in 4 eggs, one at a time.",
"Add 1 teaspoon of vanilla extract.",
"In another bowl, combine 1 cup of cocoa powder, 1 cup of flour, and a pinch of salt.",
"Gradually mix the dry ingredients into the wet mixture.",
"Pour the batter into a greased 9x13 inch pan.",
"Bake for 30 to 35 minutes.",
"Allow to cool before cutting into squares."
],
"Chocolate Cake": [
"Preheat your oven to 350°F (175°C).",
"In a bowl, mix 2 cups of flour, 2 cups of sugar, 3/4 cup of cocoa powder, and 1.5 teaspoons of baking powder.",
"Add 1 cup of butter, 4 eggs, and 1 cup of milk.",
"Mix until smooth.",
"Pour the batter into two greased 9-inch round pans.",
"Bake for 25 to 30 minutes.",
"Once cooled, frost as desired."
],
"Cupcakes": [
"Preheat your oven to 350°F (175°C).",
"In a bowl, cream together 1/2 cup of butter and 1 cup of sugar.",
"Add 2 eggs and 1 teaspoon of vanilla extract, mix well.",
"In another bowl, combine 1 1/2 cups of flour, 1 3/4 teaspoons of baking powder, and 1/2 cup of milk.",
"Gradually add the dry mixture to the wet mixture.",
"Fill cupcake liners 2/3 full.",
"Bake for 15 to 20 minutes.",
"Allow to cool before frosting."
],
"Donuts": [
"Preheat your oil in a deep fryer to 375°F (190°C).",
"In a large bowl, mix 2 cups flour, 2/3 cup sugar, 2 teaspoons baking powder, and 1/2 teaspoon salt.",
"In another bowl, mix 2 eggs, 1/2 cup milk, and 1/4 cup melted butter.",
"Combine the wet and dry ingredients until smooth.",
"Pipe the batter into donut shapes.",
"Fry for about 2-3 minutes on each side.",
"Remove and dust with sugar."
],
"Ice Cream": [
"In a bowl, mix together 2 cups of cream, 1 cup of milk, and 3/4 cup of sugar.",
"Add 1 teaspoon of vanilla extract.",
"Pour the mixture into an ice cream maker.",
"Churn until it reaches a soft-serve consistency.",
"Transfer to a container and freeze for at least 4 hours."
],
"Pancakes": [
"In a bowl, mix 1 cup flour, 2 tablespoons sugar, 1 tablespoon baking powder, and a pinch of salt.",
"In another bowl, whisk together 1 cup milk, 1 egg, and 2 tablespoons melted butter.",
"Combine both mixtures and stir until just mixed.",
"Heat a skillet over medium heat and pour 1/4 cup of batter for each pancake.",
"Cook until bubbles form and then flip, cooking until golden brown."
],
"Pudding": [
"In a saucepan, combine 2 cups of milk and 1/2 cup of sugar over medium heat.",
"In a separate bowl, mix 1/4 cup of cornstarch with a little cold milk to dissolve.",
"Once milk is hot, whisk in the cornstarch mixture.",
"Continue to stir until the mixture thickens.",
"Remove from heat and stir in vanilla extract.",
"Pour into dishes and chill in the refrigerator."
],
"Tarts": [
"Preheat your oven to 375°F (190°C).",
"Prepare tart pastry by mixing 1 1/4 cups flour with 1/2 cup butter and 1/4 cup sugar.",
"Press into a tart pan.",
"Fill with your choice of fruit filling or custard.",
"Bake for 25-30 minutes until golden.",
"Let cool before removing from the pan."
],
"Waffles": [
"Preheat your waffle maker.",
"In a bowl, mix 2 cups of flour, 2 tablespoons of sugar, 1 tablespoon of baking powder, and 1/2 teaspoon of salt.",
"In another bowl, whisk together 2 eggs, 1 3/4 cups of milk, and 1/2 cup of melted butter.",
"Combine both mixtures until just combined.",
"Pour batter into the waffle maker and cook until golden brown."
]
},
hot: {
"Chili": [
"In a large pot, cook 1 lb of ground beef until browned.",
"Add chopped onions, garlic, and bell peppers, cook until soft.",
"Stir in 2 cans of diced tomatoes, 1 can of kidney beans, and 1 can of chili beans.",
"Add chili powder and cumin to taste.",
"Simmer for at least 30 minutes."
],
"Curry": [
"Heat 2 tablespoons of oil in a pot.",
"Add 1 chopped onion and cook until soft.",
"Stir in garlic, ginger, and curry powder.",
"Add your choice of protein (chicken/tofu) and cook until browned.",
"Add vegetables and coconut milk, simmer until cooked."
],
"Jalapeno Poppers": [
"Preheat your oven to 400°F (200°C).",
"Cut jalapenos in half and remove seeds.",
"Mix cream cheese with shredded cheese.",
"Fill jalapenos with cheese mixture.",
"Wrap with bacon and arrange on a baking sheet.",
"Bake for 20-25 minutes until bacon is crispy."
],
"Hot Wings": [
"Preheat your oven to 400°F (200°C).",
"Mix melted butter with hot sauce.",
"Toss chicken wings in the sauce and place on a baking sheet.",
"Bake for 40-45 minutes until crispy.",
"Serve with ranch or blue cheese dressing."
],
"Spicy Tacos": [
"Cook ground beef with taco seasoning in a skillet.",
"Warm taco shells according to package instructions.",
"Fill with meat, shredded lettuce, diced tomatoes, and shredded cheese.",
"Top with hot sauce or jalapenos."
],
"Salsa": [
"Dice 4 tomatoes, 1 onion, and 1 jalapeno.",
"Combine in a bowl with 1/4 cup chopped cilantro and juice of 1 lime.",
"Season with salt to taste.",
"Chill in the refrigerator before serving."
],
"Pepper Pot Soup": [
"In a pot, sauté chopped onions and bell peppers in oil.",
"Add 1 lb of meat (beef/chicken) and brown it.",
"Pour in 4 cups of broth and add spices.",
"Simmer until the meat is tender.",
"Serve hot."
],
"Buffalo Cauliflower": [
"Preheat your oven to 450°F (230°C).",
"Cut cauliflower into florets.",
"Toss with hot sauce and olive oil.",
"Spread on a baking sheet and roast for 20 minutes until crispy."
],
"Spicy Pizza": [
"Preheat your oven according to the pizza dough instructions.",
"Roll out pizza dough on a baking sheet.",
"Spread pizza sauce and sprinkle with cheese.",
"Add sliced hot peppers and additional spices.",
"Bake until crust is golden and cheese is bubbly."
]
}
};
function showRecipes() {
const recipeType = document.getElementById('recipeType').value;
const recipeList = document.getElementById('recipes');
const recipeDisplay = document.getElementById('recipeList');
const procedureDisplay = document.getElementById('procedure');
const procedureText = document.getElementById('procedureText');
// Clear previous list and procedure
recipeList.innerHTML = '';
procedureDisplay.classList.add('hidden');
if (recipeType) {
// Get recipes and sort them
const selectedRecipes = Object.keys(recipes[recipeType]).sort();
// Populate the list
selectedRecipes.forEach(recipe => {
const li = document.createElement('li');
li.textContent = recipe;
li.onclick = () => showProcedure(recipe, recipeType); // Set procedure display on click
recipeList.appendChild(li);
});
// Show the recipe list section
recipeDisplay.classList.remove('hidden');
} else {
// If no selection, hide the recipe list
recipeDisplay.classList.add('hidden');
}
}
function showProcedure(recipeName, recipeType) {
const procedureText = document.getElementById('procedureText');
const procedureDisplay = document.getElementById('procedure');
// Display the procedure for the selected recipe
procedureText.innerHTML = recipes[recipeType][recipeName].map(step => `<li>${step}</li>`).join('');
procedureDisplay.classList.remove('hidden');
}