Add 3 files
Browse files- README.md +7 -5
- index.html +1114 -19
- prompts.txt +0 -0
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: timayo
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: yellow
|
5 |
+
colorTo: yellow
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,1114 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
+
<style>
|
10 |
+
/* Custom animations */
|
11 |
+
@keyframes fadeIn {
|
12 |
+
from { opacity: 0; }
|
13 |
+
to { opacity: 1; }
|
14 |
+
}
|
15 |
+
|
16 |
+
.fade-in {
|
17 |
+
animation: fadeIn 0.5s ease-in-out;
|
18 |
+
}
|
19 |
+
|
20 |
+
/* Custom scrollbar */
|
21 |
+
::-webkit-scrollbar {
|
22 |
+
width: 8px;
|
23 |
+
}
|
24 |
+
|
25 |
+
::-webkit-scrollbar-track {
|
26 |
+
background: #f1f1f1;
|
27 |
+
border-radius: 10px;
|
28 |
+
}
|
29 |
+
|
30 |
+
::-webkit-scrollbar-thumb {
|
31 |
+
background: #888;
|
32 |
+
border-radius: 10px;
|
33 |
+
}
|
34 |
+
|
35 |
+
::-webkit-scrollbar-thumb:hover {
|
36 |
+
background: #555;
|
37 |
+
}
|
38 |
+
|
39 |
+
/* Custom checkbox */
|
40 |
+
.custom-checkbox input:checked ~ .checkmark {
|
41 |
+
background-color: #10B981;
|
42 |
+
border-color: #10B981;
|
43 |
+
}
|
44 |
+
|
45 |
+
.custom-checkbox input:checked ~ .checkmark:after {
|
46 |
+
display: block;
|
47 |
+
}
|
48 |
+
|
49 |
+
.custom-checkbox .checkmark:after {
|
50 |
+
content: "";
|
51 |
+
position: absolute;
|
52 |
+
left: 6px;
|
53 |
+
top: 2px;
|
54 |
+
width: 5px;
|
55 |
+
height: 10px;
|
56 |
+
border: solid white;
|
57 |
+
border-width: 0 2px 2px 0;
|
58 |
+
transform: rotate(45deg);
|
59 |
+
}
|
60 |
+
|
61 |
+
/* Pulse animation for active buttons */
|
62 |
+
@keyframes pulse {
|
63 |
+
0% { transform: scale(1); }
|
64 |
+
50% { transform: scale(1.05); }
|
65 |
+
100% { transform: scale(1); }
|
66 |
+
}
|
67 |
+
|
68 |
+
.pulse {
|
69 |
+
animation: pulse 2s infinite;
|
70 |
+
}
|
71 |
+
</style>
|
72 |
+
</head>
|
73 |
+
<body class="bg-gray-50 font-sans">
|
74 |
+
<!-- App Container -->
|
75 |
+
<div id="app" class="max-w-md mx-auto bg-white shadow-lg rounded-lg overflow-hidden min-h-screen">
|
76 |
+
<!-- Header -->
|
77 |
+
<header class="bg-emerald-600 text-white p-4 flex justify-between items-center">
|
78 |
+
<button id="back-btn" class="text-white invisible">
|
79 |
+
<i class="fas fa-arrow-left text-xl"></i>
|
80 |
+
</button>
|
81 |
+
<h1 class="text-xl font-bold">CookMaster</h1>
|
82 |
+
<button id="profile-btn" class="text-white">
|
83 |
+
<i class="fas fa-user text-xl"></i>
|
84 |
+
</button>
|
85 |
+
</header>
|
86 |
+
|
87 |
+
<!-- Main Content Area - Screens will be loaded here -->
|
88 |
+
<main id="screen-container" class="p-4 pb-20 overflow-y-auto" style="height: calc(100vh - 128px);">
|
89 |
+
<!-- Onboarding Screen (Default) -->
|
90 |
+
<div id="onboarding-screen" class="fade-in">
|
91 |
+
<div class="text-center mb-8">
|
92 |
+
<img src="https://cdn-icons-png.flaticon.com/512/2933/2933245.png" alt="CookMaster Logo" class="w-32 h-32 mx-auto mb-4">
|
93 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-2">Welcome to CookMaster</h2>
|
94 |
+
<p class="text-gray-600">Your personal cooking assistant to help you master the kitchen!</p>
|
95 |
+
</div>
|
96 |
+
|
97 |
+
<div class="bg-emerald-50 rounded-lg p-6 mb-6">
|
98 |
+
<h3 class="font-semibold text-emerald-800 mb-3">Let's get started</h3>
|
99 |
+
<p class="text-gray-700 mb-4">Tell us about your preferences so we can recommend the best recipes for you.</p>
|
100 |
+
|
101 |
+
<div class="space-y-4">
|
102 |
+
<div>
|
103 |
+
<label class="block text-gray-700 mb-1">Dietary Preferences</label>
|
104 |
+
<div class="flex flex-wrap gap-2">
|
105 |
+
<button class="preference-btn" data-pref="vegetarian">Vegetarian</button>
|
106 |
+
<button class="preference-btn" data-pref="vegan">Vegan</button>
|
107 |
+
<button class="preference-btn" data-pref="gluten-free">Gluten-Free</button>
|
108 |
+
<button class="preference-btn" data-pref="dairy-free">Dairy-Free</button>
|
109 |
+
</div>
|
110 |
+
</div>
|
111 |
+
|
112 |
+
<div>
|
113 |
+
<label class="block text-gray-700 mb-1">Allergies</label>
|
114 |
+
<div class="flex flex-wrap gap-2">
|
115 |
+
<button class="preference-btn" data-pref="nuts">Nuts</button>
|
116 |
+
<button class="preference-btn" data-pref="shellfish">Shellfish</button>
|
117 |
+
<button class="preference-btn" data-pref="eggs">Eggs</button>
|
118 |
+
<button class="preference-btn" data-pref="soy">Soy</button>
|
119 |
+
</div>
|
120 |
+
</div>
|
121 |
+
|
122 |
+
<div>
|
123 |
+
<label class="block text-gray-700 mb-1">Cooking Skill Level</label>
|
124 |
+
<div class="flex flex-wrap gap-2">
|
125 |
+
<button class="preference-btn active" data-pref="beginner">Beginner</button>
|
126 |
+
<button class="preference-btn" data-pref="intermediate">Intermediate</button>
|
127 |
+
<button class="preference-btn" data-pref="advanced">Advanced</button>
|
128 |
+
</div>
|
129 |
+
</div>
|
130 |
+
</div>
|
131 |
+
</div>
|
132 |
+
|
133 |
+
<button id="get-started-btn" class="w-full bg-emerald-600 hover:bg-emerald-700 text-white font-bold py-3 px-4 rounded-lg transition duration-200 pulse">
|
134 |
+
Get Started
|
135 |
+
</button>
|
136 |
+
</div>
|
137 |
+
|
138 |
+
<!-- Home Screen (Hidden by default) -->
|
139 |
+
<div id="home-screen" class="hidden fade-in">
|
140 |
+
<div class="mb-6">
|
141 |
+
<h2 class="text-xl font-bold text-gray-800 mb-2">Hello, Chef!</h2>
|
142 |
+
<p class="text-gray-600">What would you like to cook today?</p>
|
143 |
+
</div>
|
144 |
+
|
145 |
+
<!-- Daily Tip -->
|
146 |
+
<div class="bg-amber-50 border-l-4 border-amber-400 p-4 mb-6 rounded-r-lg">
|
147 |
+
<div class="flex items-start">
|
148 |
+
<div class="flex-shrink-0">
|
149 |
+
<i class="fas fa-lightbulb text-amber-500 text-xl"></i>
|
150 |
+
</div>
|
151 |
+
<div class="ml-3">
|
152 |
+
<h3 class="text-sm font-medium text-amber-800">Today's Tip</h3>
|
153 |
+
<p class="text-sm text-amber-700">Always sharpen your knives before cooking. A sharp knife is safer than a dull one!</p>
|
154 |
+
</div>
|
155 |
+
</div>
|
156 |
+
</div>
|
157 |
+
|
158 |
+
<!-- Quick Actions -->
|
159 |
+
<div class="grid grid-cols-2 gap-4 mb-6">
|
160 |
+
<button id="start-cooking-btn" class="bg-emerald-100 hover:bg-emerald-200 text-emerald-800 p-4 rounded-lg flex flex-col items-center transition duration-200">
|
161 |
+
<i class="fas fa-utensils text-3xl mb-2"></i>
|
162 |
+
<span>Start Cooking</span>
|
163 |
+
</button>
|
164 |
+
<button id="try-challenge-btn" class="bg-purple-100 hover:bg-purple-200 text-purple-800 p-4 rounded-lg flex flex-col items-center transition duration-200">
|
165 |
+
<i class="fas fa-trophy text-3xl mb-2"></i>
|
166 |
+
<span>Try a Challenge</span>
|
167 |
+
</button>
|
168 |
+
</div>
|
169 |
+
|
170 |
+
<!-- Featured Recipes -->
|
171 |
+
<div class="mb-4">
|
172 |
+
<div class="flex justify-between items-center mb-3">
|
173 |
+
<h3 class="font-bold text-gray-800">Featured Recipes</h3>
|
174 |
+
<button id="view-all-recipes-btn" class="text-emerald-600 text-sm">View All</button>
|
175 |
+
</div>
|
176 |
+
|
177 |
+
<div class="grid grid-cols-2 gap-3">
|
178 |
+
<div class="recipe-card" data-id="1">
|
179 |
+
<img src="https://images.unsplash.com/photo-1546069901-ba9590aed2c5?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8MXx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60" alt="Avocado Toast" class="w-full h-32 object-cover rounded-lg">
|
180 |
+
<div class="p-2">
|
181 |
+
<h4 class="font-medium text-sm">Avocado Toast</h4>
|
182 |
+
<div class="flex justify-between text-xs text-gray-500 mt-1">
|
183 |
+
<span><i class="fas fa-clock"></i> 10 min</span>
|
184 |
+
<span><i class="fas fa-signal"></i> Easy</span>
|
185 |
+
</div>
|
186 |
+
</div>
|
187 |
+
</div>
|
188 |
+
|
189 |
+
<div class="recipe-card" data-id="2">
|
190 |
+
<img src="https://images.unsplash.com/photo-1512621776951-a57141f2eefd?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8Mnx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60" alt="Vegetable Salad" class="w-full h-32 object-cover rounded-lg">
|
191 |
+
<div class="p-2">
|
192 |
+
<h4 class="font-medium text-sm">Vegetable Salad</h4>
|
193 |
+
<div class="flex justify-between text-xs text-gray-500 mt-1">
|
194 |
+
<span><i class="fas fa-clock"></i> 15 min</span>
|
195 |
+
<span><i class="fas fa-signal"></i> Easy</span>
|
196 |
+
</div>
|
197 |
+
</div>
|
198 |
+
</div>
|
199 |
+
</div>
|
200 |
+
</div>
|
201 |
+
|
202 |
+
<!-- Weekly Challenge -->
|
203 |
+
<div class="bg-gradient-to-r from-blue-50 to-indigo-50 p-4 rounded-lg">
|
204 |
+
<div class="flex items-center mb-2">
|
205 |
+
<i class="fas fa-trophy text-blue-500 mr-2"></i>
|
206 |
+
<h3 class="font-bold text-blue-800">Weekly Challenge</h3>
|
207 |
+
</div>
|
208 |
+
<p class="text-sm text-blue-700 mb-3">Master the perfect omelette this week!</p>
|
209 |
+
<button class="w-full bg-blue-500 hover:bg-blue-600 text-white text-sm font-medium py-2 px-4 rounded-lg transition duration-200">
|
210 |
+
Take the Challenge
|
211 |
+
</button>
|
212 |
+
</div>
|
213 |
+
</div>
|
214 |
+
|
215 |
+
<!-- Recipe List/Search Screen (Hidden by default) -->
|
216 |
+
<div id="recipe-list-screen" class="hidden fade-in">
|
217 |
+
<div class="mb-4">
|
218 |
+
<div class="relative">
|
219 |
+
<input type="text" placeholder="Search recipes..." class="w-full p-3 pl-10 bg-gray-100 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500">
|
220 |
+
<i class="fas fa-search absolute left-3 top-3.5 text-gray-400"></i>
|
221 |
+
</div>
|
222 |
+
</div>
|
223 |
+
|
224 |
+
<div class="mb-4">
|
225 |
+
<h3 class="font-bold text-gray-800 mb-2">Filter Recipes</h3>
|
226 |
+
<div class="flex overflow-x-auto pb-2">
|
227 |
+
<button class="filter-btn active" data-filter="all">All</button>
|
228 |
+
<button class="filter-btn" data-filter="breakfast">Breakfast</button>
|
229 |
+
<button class="filter-btn" data-filter="lunch">Lunch</button>
|
230 |
+
<button class="filter-btn" data-filter="dinner">Dinner</button>
|
231 |
+
<button class="filter-btn" data-filter="dessert">Dessert</button>
|
232 |
+
<button class="filter-btn" data-filter="snack">Snack</button>
|
233 |
+
</div>
|
234 |
+
</div>
|
235 |
+
|
236 |
+
<div class="space-y-4">
|
237 |
+
<div class="recipe-card" data-id="1">
|
238 |
+
<div class="flex">
|
239 |
+
<img src="https://images.unsplash.com/photo-1546069901-ba9590aed2c5?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8MXx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60" alt="Avocado Toast" class="w-24 h-24 object-cover rounded-lg">
|
240 |
+
<div class="ml-3 flex-1">
|
241 |
+
<h4 class="font-medium">Avocado Toast</h4>
|
242 |
+
<p class="text-sm text-gray-500 mt-1">Simple, healthy and delicious breakfast</p>
|
243 |
+
<div class="flex justify-between text-xs text-gray-500 mt-2">
|
244 |
+
<span><i class="fas fa-clock"></i> 10 min</span>
|
245 |
+
<span><i class="fas fa-signal"></i> Easy</span>
|
246 |
+
<span><i class="fas fa-fire"></i> 320 cal</span>
|
247 |
+
</div>
|
248 |
+
</div>
|
249 |
+
</div>
|
250 |
+
</div>
|
251 |
+
|
252 |
+
<div class="recipe-card" data-id="2">
|
253 |
+
<div class="flex">
|
254 |
+
<img src="https://images.unsplash.com/photo-1512621776951-a57141f2eefd?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8Mnx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60" alt="Vegetable Salad" class="w-24 h-24 object-cover rounded-lg">
|
255 |
+
<div class="ml-3 flex-1">
|
256 |
+
<h4 class="font-medium">Vegetable Salad</h4>
|
257 |
+
<p class="text-sm text-gray-500 mt-1">Fresh and crunchy summer salad</p>
|
258 |
+
<div class="flex justify-between text-xs text-gray-500 mt-2">
|
259 |
+
<span><i class="fas fa-clock"></i> 15 min</span>
|
260 |
+
<span><i class="fas fa-signal"></i> Easy</span>
|
261 |
+
<span><i class="fas fa-fire"></i> 250 cal</span>
|
262 |
+
</div>
|
263 |
+
</div>
|
264 |
+
</div>
|
265 |
+
</div>
|
266 |
+
|
267 |
+
<div class="recipe-card" data-id="3">
|
268 |
+
<div class="flex">
|
269 |
+
<img src="https://images.unsplash.com/photo-1559847844-5315695dadae?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8NHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60" alt="Pasta" class="w-24 h-24 object-cover rounded-lg">
|
270 |
+
<div class="ml-3 flex-1">
|
271 |
+
<h4 class="font-medium">Creamy Pasta</h4>
|
272 |
+
<p class="text-sm text-gray-500 mt-1">Rich and creamy pasta dish</p>
|
273 |
+
<div class="flex justify-between text-xs text-gray-500 mt-2">
|
274 |
+
<span><i class="fas fa-clock"></i> 25 min</span>
|
275 |
+
<span><i class="fas fa-signal"></i> Medium</span>
|
276 |
+
<span><i class="fas fa-fire"></i> 450 cal</span>
|
277 |
+
</div>
|
278 |
+
</div>
|
279 |
+
</div>
|
280 |
+
</div>
|
281 |
+
|
282 |
+
<div class="recipe-card" data-id="4">
|
283 |
+
<div class="flex">
|
284 |
+
<img src="https://images.unsplash.com/photo-1565299624946-b28f40a0ae38?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8Nnx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60" alt="Pizza" class="w-24 h-24 object-cover rounded-lg">
|
285 |
+
<div class="ml-3 flex-1">
|
286 |
+
<h4 class="font-medium">Homemade Pizza</h4>
|
287 |
+
<p class="text-sm text-gray-500 mt-1">Make your own pizza from scratch</p>
|
288 |
+
<div class="flex justify-between text-xs text-gray-500 mt-2">
|
289 |
+
<span><i class="fas fa-clock"></i> 1 hr</span>
|
290 |
+
<span><i class="fas fa-signal"></i> Hard</span>
|
291 |
+
<span><i class="fas fa-fire"></i> 600 cal</span>
|
292 |
+
</div>
|
293 |
+
</div>
|
294 |
+
</div>
|
295 |
+
</div>
|
296 |
+
</div>
|
297 |
+
</div>
|
298 |
+
|
299 |
+
<!-- Recipe Detail Screen (Hidden by default) -->
|
300 |
+
<div id="recipe-detail-screen" class="hidden fade-in">
|
301 |
+
<div class="mb-4">
|
302 |
+
<img id="recipe-detail-image" src="" alt="Recipe" class="w-full h-48 object-cover rounded-lg">
|
303 |
+
</div>
|
304 |
+
|
305 |
+
<div class="flex justify-between items-center mb-4">
|
306 |
+
<div>
|
307 |
+
<h2 id="recipe-detail-title" class="text-xl font-bold text-gray-800"></h2>
|
308 |
+
<div class="flex text-sm text-gray-500 mt-1">
|
309 |
+
<span id="recipe-detail-time" class="mr-3"><i class="fas fa-clock"></i> </span>
|
310 |
+
<span id="recipe-detail-difficulty" class="mr-3"><i class="fas fa-signal"></i> </span>
|
311 |
+
<span id="recipe-detail-calories"><i class="fas fa-fire"></i> </span>
|
312 |
+
</div>
|
313 |
+
</div>
|
314 |
+
<button id="start-cooking-detail-btn" class="bg-emerald-600 hover:bg-emerald-700 text-white font-bold py-2 px-4 rounded-lg transition duration-200">
|
315 |
+
Start
|
316 |
+
</button>
|
317 |
+
</div>
|
318 |
+
|
319 |
+
<div class="mb-6">
|
320 |
+
<p id="recipe-detail-description" class="text-gray-700"></p>
|
321 |
+
</div>
|
322 |
+
|
323 |
+
<div class="mb-6">
|
324 |
+
<h3 class="font-bold text-gray-800 mb-3 flex items-center">
|
325 |
+
<i class="fas fa-list-ul text-emerald-600 mr-2"></i> Ingredients
|
326 |
+
</h3>
|
327 |
+
<div id="ingredients-list" class="space-y-2">
|
328 |
+
<!-- Ingredients will be added here by JavaScript -->
|
329 |
+
</div>
|
330 |
+
</div>
|
331 |
+
|
332 |
+
<div>
|
333 |
+
<h3 class="font-bold text-gray-800 mb-3 flex items-center">
|
334 |
+
<i class="fas fa-list-ol text-emerald-600 mr-2"></i> Instructions
|
335 |
+
</h3>
|
336 |
+
<div id="instructions-list" class="space-y-4">
|
337 |
+
<!-- Instructions will be added here by JavaScript -->
|
338 |
+
</div>
|
339 |
+
</div>
|
340 |
+
|
341 |
+
<!-- Timer Modal (Hidden by default) -->
|
342 |
+
<div id="timer-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
343 |
+
<div class="bg-white rounded-lg p-6 w-11/12 max-w-sm">
|
344 |
+
<div class="flex justify-between items-center mb-4">
|
345 |
+
<h3 class="font-bold text-lg">Cooking Timer</h3>
|
346 |
+
<button id="close-timer-btn" class="text-gray-500 hover:text-gray-700">
|
347 |
+
<i class="fas fa-times"></i>
|
348 |
+
</button>
|
349 |
+
</div>
|
350 |
+
|
351 |
+
<div class="text-center mb-6">
|
352 |
+
<div id="timer-display" class="text-4xl font-mono font-bold mb-2">00:00</div>
|
353 |
+
<div class="flex justify-center space-x-4">
|
354 |
+
<button id="start-timer-btn" class="bg-emerald-600 hover:bg-emerald-700 text-white font-bold py-2 px-4 rounded-lg transition duration-200">
|
355 |
+
Start
|
356 |
+
</button>
|
357 |
+
<button id="reset-timer-btn" class="bg-gray-200 hover:bg-gray-300 text-gray-800 font-bold py-2 px-4 rounded-lg transition duration-200">
|
358 |
+
Reset
|
359 |
+
</button>
|
360 |
+
</div>
|
361 |
+
</div>
|
362 |
+
|
363 |
+
<div class="flex items-center">
|
364 |
+
<input type="number" id="timer-minutes" min="1" max="120" value="5" class="w-16 p-2 border rounded-lg text-center">
|
365 |
+
<span class="mx-2">minutes</span>
|
366 |
+
<button id="set-timer-btn" class="bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded-lg transition duration-200 ml-auto">
|
367 |
+
Set
|
368 |
+
</button>
|
369 |
+
</div>
|
370 |
+
</div>
|
371 |
+
</div>
|
372 |
+
</div>
|
373 |
+
|
374 |
+
<!-- Tips & Tricks Screen (Hidden by default) -->
|
375 |
+
<div id="tips-screen" class="hidden fade-in">
|
376 |
+
<div class="mb-4">
|
377 |
+
<h2 class="text-xl font-bold text-gray-800 mb-2">Tips & Tricks</h2>
|
378 |
+
<p class="text-gray-600">Learn from the experts to improve your cooking skills</p>
|
379 |
+
</div>
|
380 |
+
|
381 |
+
<div class="mb-4">
|
382 |
+
<div class="flex overflow-x-auto pb-2">
|
383 |
+
<button class="filter-btn active" data-filter="all">All</button>
|
384 |
+
<button class="filter-btn" data-filter="knives">Knives</button>
|
385 |
+
<button class="filter-btn" data-filter="vegetables">Vegetables</button>
|
386 |
+
<button class="filter-btn" data-filter="meat">Meat</button>
|
387 |
+
<button class="filter-btn" data-filter="baking">Baking</button>
|
388 |
+
<button class="filter-btn" data-filter="storage">Storage</button>
|
389 |
+
</div>
|
390 |
+
</div>
|
391 |
+
|
392 |
+
<div class="space-y-4">
|
393 |
+
<div class="tip-card" data-id="1">
|
394 |
+
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-100">
|
395 |
+
<div class="flex justify-between items-start mb-2">
|
396 |
+
<h3 class="font-bold text-gray-800">Knife Skills 101</h3>
|
397 |
+
<button class="text-gray-400 hover:text-amber-500 save-tip-btn">
|
398 |
+
<i class="far fa-bookmark"></i>
|
399 |
+
</button>
|
400 |
+
</div>
|
401 |
+
<p class="text-gray-700 text-sm mb-3">Learn how to properly hold and use a chef's knife for efficient chopping.</p>
|
402 |
+
<div class="flex justify-between text-xs text-gray-500">
|
403 |
+
<span>Knives</span>
|
404 |
+
<span>2 min read</span>
|
405 |
+
</div>
|
406 |
+
</div>
|
407 |
+
</div>
|
408 |
+
|
409 |
+
<div class="tip-card" data-id="2">
|
410 |
+
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-100">
|
411 |
+
<div class="flex justify-between items-start mb-2">
|
412 |
+
<h3 class="font-bold text-gray-800">Perfect Vegetable Chopping</h3>
|
413 |
+
<button class="text-gray-400 hover:text-amber-500 save-tip-btn">
|
414 |
+
<i class="far fa-bookmark"></i>
|
415 |
+
</button>
|
416 |
+
</div>
|
417 |
+
<p class="text-gray-700 text-sm mb-3">Uniformly chopped vegetables cook more evenly. Here's how to achieve perfect cuts every time.</p>
|
418 |
+
<div class="flex justify-between text-xs text-gray-500">
|
419 |
+
<span>Vegetables</span>
|
420 |
+
<span>3 min read</span>
|
421 |
+
</div>
|
422 |
+
</div>
|
423 |
+
</div>
|
424 |
+
|
425 |
+
<div class="tip-card" data-id="3">
|
426 |
+
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-100">
|
427 |
+
<div class="flex justify-between items-start mb-2">
|
428 |
+
<h3 class="font-bold text-gray-800">Meat Temperature Guide</h3>
|
429 |
+
<button class="text-gray-400 hover:text-amber-500 save-tip-btn">
|
430 |
+
<i class="far fa-bookmark"></i>
|
431 |
+
</button>
|
432 |
+
</div>
|
433 |
+
<p class="text-gray-700 text-sm mb-3">Never overcook meat again with this simple temperature guide for perfect doneness.</p>
|
434 |
+
<div class="flex justify-between text-xs text-gray-500">
|
435 |
+
<span>Meat</span>
|
436 |
+
<span>4 min read</span>
|
437 |
+
</div>
|
438 |
+
</div>
|
439 |
+
</div>
|
440 |
+
|
441 |
+
<div class="tip-card" data-id="4">
|
442 |
+
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-100">
|
443 |
+
<div class="flex justify-between items-start mb-2">
|
444 |
+
<h3 class="font-bold text-gray-800">Baking Measurements</h3>
|
445 |
+
<button class="text-gray-400 hover:text-amber-500 save-tip-btn">
|
446 |
+
<i class="far fa-bookmark"></i>
|
447 |
+
</button>
|
448 |
+
</div>
|
449 |
+
<p class="text-gray-700 text-sm mb-3">Baking is a science. Learn how to measure ingredients properly for consistent results.</p>
|
450 |
+
<div class="flex justify-between text-xs text-gray-500">
|
451 |
+
<span>Baking</span>
|
452 |
+
<span>3 min read</span>
|
453 |
+
</div>
|
454 |
+
</div>
|
455 |
+
</div>
|
456 |
+
|
457 |
+
<div class="tip-card" data-id="5">
|
458 |
+
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-100">
|
459 |
+
<div class="flex justify-between items-start mb-2">
|
460 |
+
<h3 class="font-bold text-gray-800">Food Storage Tips</h3>
|
461 |
+
<button class="text-gray-400 hover:text-amber-500 save-tip-btn">
|
462 |
+
<i class="far fa-bookmark"></i>
|
463 |
+
</button>
|
464 |
+
</div>
|
465 |
+
<p class="text-gray-700 text-sm mb-3">Extend the shelf life of your ingredients with these simple storage techniques.</p>
|
466 |
+
<div class="flex justify-between text-xs text-gray-500">
|
467 |
+
<span>Storage</span>
|
468 |
+
<span>2 min read</span>
|
469 |
+
</div>
|
470 |
+
</div>
|
471 |
+
</div>
|
472 |
+
</div>
|
473 |
+
</div>
|
474 |
+
|
475 |
+
<!-- Profile/Community Screen (Hidden by default) -->
|
476 |
+
<div id="profile-screen" class="hidden fade-in">
|
477 |
+
<div class="text-center mb-6">
|
478 |
+
<div class="relative inline-block mb-3">
|
479 |
+
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="w-20 h-20 rounded-full border-4 border-emerald-100">
|
480 |
+
<button class="absolute bottom-0 right-0 bg-emerald-500 text-white rounded-full p-1">
|
481 |
+
<i class="fas fa-pencil-alt text-xs"></i>
|
482 |
+
</button>
|
483 |
+
</div>
|
484 |
+
<h2 class="text-xl font-bold text-gray-800">Sarah Johnson</h2>
|
485 |
+
<p class="text-gray-600 text-sm">Beginner Chef • 12 recipes tried</p>
|
486 |
+
</div>
|
487 |
+
|
488 |
+
<div class="bg-gray-50 rounded-lg p-4 mb-6">
|
489 |
+
<h3 class="font-semibold text-gray-800 mb-3">My Progress</h3>
|
490 |
+
|
491 |
+
<div class="space-y-4">
|
492 |
+
<div>
|
493 |
+
<div class="flex justify-between text-sm mb-1">
|
494 |
+
<span>Recipes Completed</span>
|
495 |
+
<span>12/50</span>
|
496 |
+
</div>
|
497 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
498 |
+
<div class="bg-emerald-500 h-2 rounded-full" style="width: 24%"></div>
|
499 |
+
</div>
|
500 |
+
</div>
|
501 |
+
|
502 |
+
<div>
|
503 |
+
<div class="flex justify-between text-sm mb-1">
|
504 |
+
<span>Cooking Skills</span>
|
505 |
+
<span>Beginner</span>
|
506 |
+
</div>
|
507 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
508 |
+
<div class="bg-blue-500 h-2 rounded-full" style="width: 30%"></div>
|
509 |
+
</div>
|
510 |
+
</div>
|
511 |
+
|
512 |
+
<div>
|
513 |
+
<div class="flex justify-between text-sm mb-1">
|
514 |
+
<span>Weekly Challenge Streak</span>
|
515 |
+
<span>3 weeks</span>
|
516 |
+
</div>
|
517 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
518 |
+
<div class="bg-amber-500 h-2 rounded-full" style="width: 60%"></div>
|
519 |
+
</div>
|
520 |
+
</div>
|
521 |
+
</div>
|
522 |
+
</div>
|
523 |
+
|
524 |
+
<div class="mb-6">
|
525 |
+
<h3 class="font-bold text-gray-800 mb-3">My Creations</h3>
|
526 |
+
<div class="grid grid-cols-2 gap-3">
|
527 |
+
<div class="bg-white p-3 rounded-lg shadow-sm border border-gray-100">
|
528 |
+
<img src="https://images.unsplash.com/photo-1546069901-ba9590aed2c5?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8MXx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60" alt="My Dish" class="w-full h-24 object-cover rounded-lg mb-2">
|
529 |
+
<h4 class="font-medium text-sm">Avocado Toast</h4>
|
530 |
+
<div class="flex justify-between text-xs text-gray-500 mt-1">
|
531 |
+
<span><i class="far fa-heart"></i> 24</span>
|
532 |
+
<span><i class="far fa-comment"></i> 5</span>
|
533 |
+
</div>
|
534 |
+
</div>
|
535 |
+
|
536 |
+
<div class="bg-white p-3 rounded-lg shadow-sm border border-gray-100">
|
537 |
+
<img src="https://images.unsplash.com/photo-1512621776951-a57141f2eefd?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8Mnx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60" alt="My Dish" class="w-full h-24 object-cover rounded-lg mb-2">
|
538 |
+
<h4 class="font-medium text-sm">Summer Salad</h4>
|
539 |
+
<div class="flex justify-between text-xs text-gray-500 mt-1">
|
540 |
+
<span><i class="far fa-heart"></i> 18</span>
|
541 |
+
<span><i class="far fa-comment"></i> 3</span>
|
542 |
+
</div>
|
543 |
+
</div>
|
544 |
+
</div>
|
545 |
+
</div>
|
546 |
+
|
547 |
+
<div>
|
548 |
+
<h3 class="font-bold text-gray-800 mb-3">Saved Tips</h3>
|
549 |
+
<div class="space-y-3">
|
550 |
+
<div class="bg-white p-3 rounded-lg shadow-sm border border-gray-100 flex items-center">
|
551 |
+
<div class="bg-amber-100 text-amber-600 p-2 rounded-lg mr-3">
|
552 |
+
<i class="fas fa-bookmark"></i>
|
553 |
+
</div>
|
554 |
+
<div>
|
555 |
+
<h4 class="font-medium text-sm">Knife Skills 101</h4>
|
556 |
+
<p class="text-xs text-gray-500">Learn proper knife handling techniques</p>
|
557 |
+
</div>
|
558 |
+
</div>
|
559 |
+
|
560 |
+
<div class="bg-white p-3 rounded-lg shadow-sm border border-gray-100 flex items-center">
|
561 |
+
<div class="bg-amber-100 text-amber-600 p-2 rounded-lg mr-3">
|
562 |
+
<i class="fas fa-bookmark"></i>
|
563 |
+
</div>
|
564 |
+
<div>
|
565 |
+
<h4 class="font-medium text-sm">Perfect Vegetable Chopping</h4>
|
566 |
+
<p class="text-xs text-gray-500">Uniform cuts for even cooking</p>
|
567 |
+
</div>
|
568 |
+
</div>
|
569 |
+
</div>
|
570 |
+
</div>
|
571 |
+
</div>
|
572 |
+
</main>
|
573 |
+
|
574 |
+
<!-- Bottom Navigation -->
|
575 |
+
<nav class="bg-white border-t border-gray-200 fixed bottom-0 w-full max-w-md">
|
576 |
+
<div class="flex justify-around">
|
577 |
+
<button id="home-nav-btn" class="p-4 text-emerald-600">
|
578 |
+
<i class="fas fa-home text-xl"></i>
|
579 |
+
</button>
|
580 |
+
<button id="recipes-nav-btn" class="p-4 text-gray-500">
|
581 |
+
<i class="fas fa-utensils text-xl"></i>
|
582 |
+
</button>
|
583 |
+
<button id="tips-nav-btn" class="p-4 text-gray-500">
|
584 |
+
<i class="fas fa-lightbulb text-xl"></i>
|
585 |
+
</button>
|
586 |
+
<button id="profile-nav-btn" class="p-4 text-gray-500">
|
587 |
+
<i class="fas fa-user text-xl"></i>
|
588 |
+
</button>
|
589 |
+
</div>
|
590 |
+
</nav>
|
591 |
+
</div>
|
592 |
+
|
593 |
+
<script>
|
594 |
+
// Sample recipe data
|
595 |
+
const recipes = {
|
596 |
+
1: {
|
597 |
+
title: "Avocado Toast",
|
598 |
+
description: "A simple yet delicious breakfast that's packed with healthy fats and fiber. Perfect for busy mornings!",
|
599 |
+
time: "10 min",
|
600 |
+
difficulty: "Easy",
|
601 |
+
calories: "320 cal",
|
602 |
+
image: "https://images.unsplash.com/photo-1546069901-ba9590aed2c5?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8MXx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60",
|
603 |
+
ingredients: [
|
604 |
+
"2 slices whole grain bread",
|
605 |
+
"1 ripe avocado",
|
606 |
+
"1/2 lemon, juiced",
|
607 |
+
"Salt and pepper to taste",
|
608 |
+
"Red pepper flakes (optional)",
|
609 |
+
"2 eggs (optional)",
|
610 |
+
"Microgreens for garnish (optional)"
|
611 |
+
],
|
612 |
+
instructions: [
|
613 |
+
"Toast the bread until golden and crisp.",
|
614 |
+
"Cut the avocado in half, remove the pit, and scoop the flesh into a bowl.",
|
615 |
+
"Add lemon juice, salt, and pepper to the avocado and mash with a fork to your desired consistency.",
|
616 |
+
"Spread the mashed avocado evenly on the toasted bread.",
|
617 |
+
"If adding eggs, fry or poach them to your liking and place on top of the avocado.",
|
618 |
+
"Sprinkle with red pepper flakes if desired and garnish with microgreens.",
|
619 |
+
"Serve immediately and enjoy!"
|
620 |
+
]
|
621 |
+
},
|
622 |
+
2: {
|
623 |
+
title: "Vegetable Salad",
|
624 |
+
description: "A refreshing and crunchy salad packed with fresh vegetables and a light vinaigrette. Perfect for summer days!",
|
625 |
+
time: "15 min",
|
626 |
+
difficulty: "Easy",
|
627 |
+
calories: "250 cal",
|
628 |
+
image: "https://images.unsplash.com/photo-1512621776951-a57141f2eefd?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8Mnx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60",
|
629 |
+
ingredients: [
|
630 |
+
"2 cups mixed salad greens",
|
631 |
+
"1 cucumber, diced",
|
632 |
+
"1 bell pepper, diced",
|
633 |
+
"1 cup cherry tomatoes, halved",
|
634 |
+
"1/4 red onion, thinly sliced",
|
635 |
+
"1/4 cup feta cheese, crumbled",
|
636 |
+
"2 tbsp olive oil",
|
637 |
+
"1 tbsp balsamic vinegar",
|
638 |
+
"1 tsp honey",
|
639 |
+
"Salt and pepper to taste"
|
640 |
+
],
|
641 |
+
instructions: [
|
642 |
+
"In a large bowl, combine the salad greens, cucumber, bell pepper, cherry tomatoes, and red onion.",
|
643 |
+
"In a small bowl, whisk together the olive oil, balsamic vinegar, honey, salt, and pepper to make the dressing.",
|
644 |
+
"Pour the dressing over the salad and toss gently to combine.",
|
645 |
+
"Sprinkle the crumbled feta cheese on top.",
|
646 |
+
"Serve immediately or refrigerate for up to 1 hour before serving."
|
647 |
+
]
|
648 |
+
},
|
649 |
+
3: {
|
650 |
+
title: "Creamy Pasta",
|
651 |
+
description: "A rich and creamy pasta dish that's surprisingly easy to make. Perfect for a comforting weeknight dinner.",
|
652 |
+
time: "25 min",
|
653 |
+
difficulty: "Medium",
|
654 |
+
calories: "450 cal",
|
655 |
+
image: "https://images.unsplash.com/photo-1559847844-5315695dadae?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8NHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60",
|
656 |
+
ingredients: [
|
657 |
+
"8 oz fettuccine pasta",
|
658 |
+
"2 tbsp butter",
|
659 |
+
"2 cloves garlic, minced",
|
660 |
+
"1 cup heavy cream",
|
661 |
+
"1/2 cup grated Parmesan cheese",
|
662 |
+
"Salt and pepper to taste",
|
663 |
+
"Fresh parsley, chopped (for garnish)"
|
664 |
+
],
|
665 |
+
instructions: [
|
666 |
+
"Cook the pasta according to package instructions until al dente. Reserve 1/2 cup of pasta water, then drain.",
|
667 |
+
"In a large skillet, melt the butter over medium heat. Add the garlic and sauté for about 30 seconds until fragrant.",
|
668 |
+
"Pour in the heavy cream and bring to a simmer. Cook for 2-3 minutes until slightly thickened.",
|
669 |
+
"Stir in the Parmesan cheese until melted and smooth. If the sauce is too thick, add a little of the reserved pasta water to thin it out.",
|
670 |
+
"Add the cooked pasta to the skillet and toss to coat evenly with the sauce.",
|
671 |
+
"Season with salt and pepper to taste.",
|
672 |
+
"Garnish with chopped parsley and serve immediately."
|
673 |
+
]
|
674 |
+
},
|
675 |
+
4: {
|
676 |
+
title: "Homemade Pizza",
|
677 |
+
description: "Make your own pizza from scratch with this simple dough recipe and your favorite toppings. Fun for the whole family!",
|
678 |
+
time: "1 hr",
|
679 |
+
difficulty: "Hard",
|
680 |
+
calories: "600 cal",
|
681 |
+
image: "https://images.unsplash.com/photo-1565299624946-b28f40a0ae38?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8Nnx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60",
|
682 |
+
ingredients: [
|
683 |
+
"2 1/4 tsp active dry yeast",
|
684 |
+
"1 1/2 cups warm water",
|
685 |
+
"3 1/2 cups all-purpose flour",
|
686 |
+
"2 tbsp olive oil",
|
687 |
+
"1 tsp salt",
|
688 |
+
"1 tsp sugar",
|
689 |
+
"1/2 cup pizza sauce",
|
690 |
+
"2 cups shredded mozzarella cheese",
|
691 |
+
"Toppings of your choice (pepperoni, mushrooms, bell peppers, etc.)"
|
692 |
+
],
|
693 |
+
instructions: [
|
694 |
+
"In a small bowl, dissolve yeast and sugar in warm water. Let stand for about 10 minutes until frothy.",
|
695 |
+
"In a large bowl, combine flour and salt. Make a well in the center and add the yeast mixture and olive oil. Stir until a dough forms.",
|
696 |
+
"Turn the dough out onto a lightly floured surface and knead for about 7-8 minutes until smooth and elastic.",
|
697 |
+
"Place the dough in a greased bowl, cover with a damp cloth, and let rise in a warm place for about 30 minutes until doubled in size.",
|
698 |
+
"Preheat oven to 475°F (245°C). Punch down the dough and turn it out onto a floured surface. Divide into two equal pieces for two thin crusts or use whole for one thick crust.",
|
699 |
+
"Roll the dough out to fit your pizza pan. Transfer to the pan and let rest for 5 minutes.",
|
700 |
+
"Spread pizza sauce over the dough, then add cheese and your favorite toppings.",
|
701 |
+
"Bake in the preheated oven for 12-15 minutes until the crust is golden brown and the cheese is bubbly.",
|
702 |
+
"Remove from oven and let cool for 5 minutes before slicing and serving."
|
703 |
+
]
|
704 |
+
}
|
705 |
+
};
|
706 |
+
|
707 |
+
// Sample tips data
|
708 |
+
const tips = {
|
709 |
+
1: {
|
710 |
+
title: "Knife Skills 101",
|
711 |
+
content: "Always hold your knife properly with a firm grip on the handle and your fingers curled under your other hand (the 'claw' grip) when chopping. This gives you better control and helps prevent accidents. Keep your knife sharp - a dull knife is more dangerous than a sharp one because it requires more force and is more likely to slip.",
|
712 |
+
category: "Knives",
|
713 |
+
readTime: "2 min read"
|
714 |
+
},
|
715 |
+
2: {
|
716 |
+
title: "Perfect Vegetable Chopping",
|
717 |
+
content: "For evenly cooked vegetables, try to cut them into uniform sizes. This ensures everything cooks at the same rate. When dicing onions, cut off the stem end but leave the root end intact while you make your initial cuts - this helps hold the onion together as you chop. For herbs, use a rocking motion with your chef's knife rather than chopping up and down for finer, more even cuts.",
|
718 |
+
category: "Vegetables",
|
719 |
+
readTime: "3 min read"
|
720 |
+
},
|
721 |
+
3: {
|
722 |
+
title: "Meat Temperature Guide",
|
723 |
+
content: "Invest in a good meat thermometer to ensure perfect doneness every time. For beef: 120°F (49°C) for rare, 130°F (54°C) for medium-rare, 140°F (60°C) for medium, 150°F (66°C) for medium-well, 160°F (71°C) for well done. For poultry: 165°F (74°C). For pork: 145°F (63°C). Remember that meat continues to cook after removing from heat (carryover cooking), so remove it from heat 5-10°F below your target temperature.",
|
724 |
+
category: "Meat",
|
725 |
+
readTime: "4 min read"
|
726 |
+
},
|
727 |
+
4: {
|
728 |
+
title: "Baking Measurements",
|
729 |
+
content: "Baking is a science, so precise measurements are crucial. For dry ingredients like flour, spoon it into the measuring cup and level it off with a straight edge - don't scoop directly from the bag as this packs the flour and leads to using too much. For brown sugar, pack it firmly into the cup. For liquids, use clear liquid measuring cups and check at eye level. Invest in a kitchen scale for the most accurate measurements - weight is always more precise than volume.",
|
730 |
+
category: "Baking",
|
731 |
+
readTime: "3 min read"
|
732 |
+
},
|
733 |
+
5: {
|
734 |
+
title: "Food Storage Tips",
|
735 |
+
content: "Store herbs like parsley and cilantro like flowers - trim the stems and place in a glass of water in the refrigerator, loosely covered with a plastic bag. Most vegetables should be stored unwashed in the crisper drawer. Potatoes and onions should be stored in a cool, dark place (but not together - onions make potatoes sprout). Never refrigerate tomatoes - it makes them mealy. Store mushrooms in a paper bag in the fridge to prevent moisture buildup.",
|
736 |
+
category: "Storage",
|
737 |
+
readTime: "2 min read"
|
738 |
+
}
|
739 |
+
};
|
740 |
+
|
741 |
+
// Current screen tracking
|
742 |
+
let currentScreen = 'onboarding';
|
743 |
+
let currentRecipeId = null;
|
744 |
+
let timerInterval = null;
|
745 |
+
let timerSeconds = 0;
|
746 |
+
let savedTips = [1, 2]; // Sample saved tip IDs
|
747 |
+
|
748 |
+
// DOM elements
|
749 |
+
const screenContainer = document.getElementById('screen-container');
|
750 |
+
const onboardingScreen = document.getElementById('onboarding-screen');
|
751 |
+
const homeScreen = document.getElementById('home-screen');
|
752 |
+
const recipeListScreen = document.getElementById('recipe-list-screen');
|
753 |
+
const recipeDetailScreen = document.getElementById('recipe-detail-screen');
|
754 |
+
const tipsScreen = document.getElementById('tips-screen');
|
755 |
+
const profileScreen = document.getElementById('profile-screen');
|
756 |
+
|
757 |
+
// Navigation buttons
|
758 |
+
const backBtn = document.getElementById('back-btn');
|
759 |
+
const profileBtn = document.getElementById('profile-btn');
|
760 |
+
const homeNavBtn = document.getElementById('home-nav-btn');
|
761 |
+
const recipesNavBtn = document.getElementById('recipes-nav-btn');
|
762 |
+
const tipsNavBtn = document.getElementById('tips-nav-btn');
|
763 |
+
const profileNavBtn = document.getElementById('profile-nav-btn');
|
764 |
+
|
765 |
+
// Onboarding buttons
|
766 |
+
const getStartedBtn = document.getElementById('get-started-btn');
|
767 |
+
const preferenceBtns = document.querySelectorAll('.preference-btn');
|
768 |
+
|
769 |
+
// Home screen buttons
|
770 |
+
const startCookingBtn = document.getElementById('start-cooking-btn');
|
771 |
+
const tryChallengeBtn = document.getElementById('try-challenge-btn');
|
772 |
+
const viewAllRecipesBtn = document.getElementById('view-all-recipes-btn');
|
773 |
+
const recipeCards = document.querySelectorAll('.recipe-card');
|
774 |
+
|
775 |
+
// Recipe detail screen elements
|
776 |
+
const startCookingDetailBtn = document.getElementById('start-cooking-detail-btn');
|
777 |
+
const ingredientsList = document.getElementById('ingredients-list');
|
778 |
+
const instructionsList = document.getElementById('instructions-list');
|
779 |
+
|
780 |
+
// Timer modal elements
|
781 |
+
const timerModal = document.getElementById('timer-modal');
|
782 |
+
const timerDisplay = document.getElementById('timer-display');
|
783 |
+
const startTimerBtn = document.getElementById('start-timer-btn');
|
784 |
+
const resetTimerBtn = document.getElementById('reset-timer-btn');
|
785 |
+
const closeTimerBtn = document.getElementById('close-timer-btn');
|
786 |
+
const timerMinutesInput = document.getElementById('timer-minutes');
|
787 |
+
const setTimerBtn = document.getElementById('set-timer-btn');
|
788 |
+
|
789 |
+
// Tips screen elements
|
790 |
+
const filterBtns = document.querySelectorAll('.filter-btn');
|
791 |
+
const saveTipBtns = document.querySelectorAll('.save-tip-btn');
|
792 |
+
const tipCards = document.querySelectorAll('.tip-card');
|
793 |
+
|
794 |
+
// Event listeners
|
795 |
+
document.addEventListener('DOMContentLoaded', function() {
|
796 |
+
// Set up all event listeners
|
797 |
+
setupEventListeners();
|
798 |
+
});
|
799 |
+
|
800 |
+
function setupEventListeners() {
|
801 |
+
// Navigation buttons
|
802 |
+
backBtn.addEventListener('click', goBack);
|
803 |
+
profileBtn.addEventListener('click', showProfileScreen);
|
804 |
+
homeNavBtn.addEventListener('click', showHomeScreen);
|
805 |
+
recipesNavBtn.addEventListener('click', showRecipeListScreen);
|
806 |
+
tipsNavBtn.addEventListener('click', showTipsScreen);
|
807 |
+
profileNavBtn.addEventListener('click', showProfileScreen);
|
808 |
+
|
809 |
+
// Onboarding screen
|
810 |
+
getStartedBtn.addEventListener('click', showHomeScreen);
|
811 |
+
preferenceBtns.forEach(btn => {
|
812 |
+
btn.addEventListener('click', togglePreference);
|
813 |
+
});
|
814 |
+
|
815 |
+
// Home screen
|
816 |
+
startCookingBtn.addEventListener('click', showRecipeListScreen);
|
817 |
+
tryChallengeBtn.addEventListener('click', showWeeklyChallenge);
|
818 |
+
viewAllRecipesBtn.addEventListener('click', showRecipeListScreen);
|
819 |
+
recipeCards.forEach(card => {
|
820 |
+
card.addEventListener('click', function() {
|
821 |
+
showRecipeDetailScreen(parseInt(this.getAttribute('data-id')));
|
822 |
+
});
|
823 |
+
});
|
824 |
+
|
825 |
+
// Recipe detail screen
|
826 |
+
startCookingDetailBtn.addEventListener('click', showTimerModal);
|
827 |
+
|
828 |
+
// Timer modal
|
829 |
+
startTimerBtn.addEventListener('click', startTimer);
|
830 |
+
resetTimerBtn.addEventListener('click', resetTimer);
|
831 |
+
closeTimerBtn.addEventListener('click', closeTimerModal);
|
832 |
+
setTimerBtn.addEventListener('click', setTimer);
|
833 |
+
|
834 |
+
// Tips screen
|
835 |
+
filterBtns.forEach(btn => {
|
836 |
+
btn.addEventListener('click', filterTips);
|
837 |
+
});
|
838 |
+
saveTipBtns.forEach(btn => {
|
839 |
+
btn.addEventListener('click', saveTip);
|
840 |
+
});
|
841 |
+
tipCards.forEach(card => {
|
842 |
+
card.addEventListener('click', function() {
|
843 |
+
showTipDetail(parseInt(this.getAttribute('data-id')));
|
844 |
+
});
|
845 |
+
});
|
846 |
+
}
|
847 |
+
|
848 |
+
// Navigation functions
|
849 |
+
function goBack() {
|
850 |
+
switch(currentScreen) {
|
851 |
+
case 'home':
|
852 |
+
// Can't go back from home
|
853 |
+
break;
|
854 |
+
case 'recipe-list':
|
855 |
+
showHomeScreen();
|
856 |
+
break;
|
857 |
+
case 'recipe-detail':
|
858 |
+
showRecipeListScreen();
|
859 |
+
break;
|
860 |
+
case 'tips':
|
861 |
+
showHomeScreen();
|
862 |
+
break;
|
863 |
+
case 'profile':
|
864 |
+
showHomeScreen();
|
865 |
+
break;
|
866 |
+
}
|
867 |
+
}
|
868 |
+
|
869 |
+
function showScreen(screen) {
|
870 |
+
// Hide all screens
|
871 |
+
onboardingScreen.classList.add('hidden');
|
872 |
+
homeScreen.classList.add('hidden');
|
873 |
+
recipeListScreen.classList.add('hidden');
|
874 |
+
recipeDetailScreen.classList.add('hidden');
|
875 |
+
tipsScreen.classList.add('hidden');
|
876 |
+
profileScreen.classList.add('hidden');
|
877 |
+
|
878 |
+
// Show the requested screen
|
879 |
+
switch(screen) {
|
880 |
+
case 'onboarding':
|
881 |
+
onboardingScreen.classList.remove('hidden');
|
882 |
+
backBtn.classList.add('invisible');
|
883 |
+
break;
|
884 |
+
case 'home':
|
885 |
+
homeScreen.classList.remove('hidden');
|
886 |
+
backBtn.classList.add('invisible');
|
887 |
+
updateActiveNav('home');
|
888 |
+
break;
|
889 |
+
case 'recipe-list':
|
890 |
+
recipeListScreen.classList.remove('hidden');
|
891 |
+
backBtn.classList.remove('invisible');
|
892 |
+
updateActiveNav('recipes');
|
893 |
+
break;
|
894 |
+
case 'recipe-detail':
|
895 |
+
recipeDetailScreen.classList.remove('hidden');
|
896 |
+
backBtn.classList.remove('invisible');
|
897 |
+
break;
|
898 |
+
case 'tips':
|
899 |
+
tipsScreen.classList.remove('hidden');
|
900 |
+
backBtn.classList.remove('invisible');
|
901 |
+
updateActiveNav('tips');
|
902 |
+
break;
|
903 |
+
case 'profile':
|
904 |
+
profileScreen.classList.remove('hidden');
|
905 |
+
backBtn.classList.remove('invisible');
|
906 |
+
updateActiveNav('profile');
|
907 |
+
break;
|
908 |
+
}
|
909 |
+
|
910 |
+
currentScreen = screen;
|
911 |
+
}
|
912 |
+
|
913 |
+
function updateActiveNav(active) {
|
914 |
+
// Reset all nav buttons
|
915 |
+
homeNavBtn.classList.remove('text-emerald-600');
|
916 |
+
homeNavBtn.classList.add('text-gray-500');
|
917 |
+
recipesNavBtn.classList.remove('text-emerald-600');
|
918 |
+
recipesNavBtn.classList.add('text-gray-500');
|
919 |
+
tipsNavBtn.classList.remove('text-emerald-600');
|
920 |
+
tipsNavBtn.classList.add('text-gray-500');
|
921 |
+
profileNavBtn.classList.remove('text-emerald-600');
|
922 |
+
profileNavBtn.classList.add('text-gray-500');
|
923 |
+
|
924 |
+
// Set active nav button
|
925 |
+
switch(active) {
|
926 |
+
case 'home':
|
927 |
+
homeNavBtn.classList.remove('text-gray-500');
|
928 |
+
homeNavBtn.classList.add('text-emerald-600');
|
929 |
+
break;
|
930 |
+
case 'recipes':
|
931 |
+
recipesNavBtn.classList.remove('text-gray-500');
|
932 |
+
recipesNavBtn.classList.add('text-emerald-600');
|
933 |
+
break;
|
934 |
+
case 'tips':
|
935 |
+
tipsNavBtn.classList.remove('text-gray-500');
|
936 |
+
tipsNavBtn.classList.add('text-emerald-600');
|
937 |
+
break;
|
938 |
+
case 'profile':
|
939 |
+
profileNavBtn.classList.remove('text-gray-500');
|
940 |
+
profileNavBtn.classList.add('text-emerald-600');
|
941 |
+
break;
|
942 |
+
}
|
943 |
+
}
|
944 |
+
|
945 |
+
// Screen-specific functions
|
946 |
+
function showOnboardingScreen() {
|
947 |
+
showScreen('onboarding');
|
948 |
+
}
|
949 |
+
|
950 |
+
function showHomeScreen() {
|
951 |
+
showScreen('home');
|
952 |
+
}
|
953 |
+
|
954 |
+
function showRecipeListScreen() {
|
955 |
+
showScreen('recipe-list');
|
956 |
+
}
|
957 |
+
|
958 |
+
function showRecipeDetailScreen(recipeId) {
|
959 |
+
currentRecipeId = recipeId;
|
960 |
+
const recipe = recipes[recipeId];
|
961 |
+
|
962 |
+
// Update recipe details
|
963 |
+
document.getElementById('recipe-detail-title').textContent = recipe.title;
|
964 |
+
document.getElementById('recipe-detail-description').textContent = recipe.description;
|
965 |
+
document.getElementById('recipe-detail-time').textContent += recipe.time;
|
966 |
+
document.getElementById('recipe-detail-difficulty').textContent += recipe.difficulty;
|
967 |
+
document.getElementById('recipe-detail-calories').textContent += recipe.calories;
|
968 |
+
document.getElementById('recipe-detail-image').src = recipe.image;
|
969 |
+
|
970 |
+
// Clear previous ingredients and instructions
|
971 |
+
ingredientsList.innerHTML = '';
|
972 |
+
instructionsList.innerHTML = '';
|
973 |
+
|
974 |
+
// Add ingredients
|
975 |
+
recipe.ingredients.forEach(ingredient => {
|
976 |
+
const ingredientItem = document.createElement('div');
|
977 |
+
ingredientItem.className = 'flex items-start';
|
978 |
+
ingredientItem.innerHTML = `
|
979 |
+
<label class="custom-checkbox flex items-start">
|
980 |
+
<input type="checkbox" class="hidden">
|
981 |
+
<span class="checkmark w-5 h-5 border-2 border-gray-300 rounded inline-block relative mr-2 mt-1"></span>
|
982 |
+
<span class="text-gray-700">${ingredient}</span>
|
983 |
+
</label>
|
984 |
+
`;
|
985 |
+
ingredientsList.appendChild(ingredientItem);
|
986 |
+
});
|
987 |
+
|
988 |
+
// Add instructions
|
989 |
+
recipe.instructions.forEach((instruction, index) => {
|
990 |
+
const instructionItem = document.createElement('div');
|
991 |
+
instructionItem.className = 'flex';
|
992 |
+
instructionItem.innerHTML = `
|
993 |
+
<div class="bg-emerald-600 text-white rounded-full w-6 h-6 flex items-center justify-center flex-shrink-0 mr-3">${index + 1}</div>
|
994 |
+
<p class="text-gray-700">${instruction}</p>
|
995 |
+
`;
|
996 |
+
instructionsList.appendChild(instructionItem);
|
997 |
+
});
|
998 |
+
|
999 |
+
showScreen('recipe-detail');
|
1000 |
+
}
|
1001 |
+
|
1002 |
+
function showTipsScreen() {
|
1003 |
+
showScreen('tips');
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
function showProfileScreen() {
|
1007 |
+
showScreen('profile');
|
1008 |
+
}
|
1009 |
+
|
1010 |
+
function showWeeklyChallenge() {
|
1011 |
+
alert("This week's challenge is to master the perfect omelette! Check out our tips section for guidance.");
|
1012 |
+
}
|
1013 |
+
|
1014 |
+
function showTipDetail(tipId) {
|
1015 |
+
const tip = tips[tipId];
|
1016 |
+
alert(`${tip.title}\n\n${tip.content}`);
|
1017 |
+
}
|
1018 |
+
|
1019 |
+
// Timer functions
|
1020 |
+
function showTimerModal() {
|
1021 |
+
timerModal.classList.remove('hidden');
|
1022 |
+
}
|
1023 |
+
|
1024 |
+
function closeTimerModal() {
|
1025 |
+
timerModal.classList.add('hidden');
|
1026 |
+
}
|
1027 |
+
|
1028 |
+
function startTimer() {
|
1029 |
+
if (timerInterval) {
|
1030 |
+
clearInterval(timerInterval);
|
1031 |
+
timerInterval = null;
|
1032 |
+
startTimerBtn.textContent = 'Start';
|
1033 |
+
return;
|
1034 |
+
}
|
1035 |
+
|
1036 |
+
startTimerBtn.textContent = 'Pause';
|
1037 |
+
timerInterval = setInterval(updateTimer, 1000);
|
1038 |
+
}
|
1039 |
+
|
1040 |
+
function resetTimer() {
|
1041 |
+
if (timerInterval) {
|
1042 |
+
clearInterval(timerInterval);
|
1043 |
+
timerInterval = null;
|
1044 |
+
}
|
1045 |
+
|
1046 |
+
timerSeconds = 0;
|
1047 |
+
updateTimerDisplay();
|
1048 |
+
startTimerBtn.textContent = 'Start';
|
1049 |
+
}
|
1050 |
+
|
1051 |
+
function setTimer() {
|
1052 |
+
const minutes = parseInt(timerMinutesInput.value);
|
1053 |
+
if (minutes > 0) {
|
1054 |
+
timerSeconds = minutes * 60;
|
1055 |
+
updateTimerDisplay();
|
1056 |
+
}
|
1057 |
+
}
|
1058 |
+
|
1059 |
+
function updateTimer() {
|
1060 |
+
if (timerSeconds <= 0) {
|
1061 |
+
clearInterval(timerInterval);
|
1062 |
+
timerInterval = null;
|
1063 |
+
startTimerBtn.textContent = 'Start';
|
1064 |
+
alert("Time's up!");
|
1065 |
+
return;
|
1066 |
+
}
|
1067 |
+
|
1068 |
+
timerSeconds--;
|
1069 |
+
updateTimerDisplay();
|
1070 |
+
}
|
1071 |
+
|
1072 |
+
function updateTimerDisplay() {
|
1073 |
+
const minutes = Math.floor(timerSeconds / 60);
|
1074 |
+
const seconds = timerSeconds % 60;
|
1075 |
+
timerDisplay.textContent = `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
|
1076 |
+
}
|
1077 |
+
|
1078 |
+
// Helper functions
|
1079 |
+
function togglePreference() {
|
1080 |
+
this.classList.toggle('active');
|
1081 |
+
}
|
1082 |
+
|
1083 |
+
function filterTips() {
|
1084 |
+
filterBtns.forEach(btn => btn.classList.remove('active'));
|
1085 |
+
this.classList.add('active');
|
1086 |
+
|
1087 |
+
const filter = this.getAttribute('data-filter');
|
1088 |
+
tipCards.forEach(card => {
|
1089 |
+
if (filter === 'all' || card.getAttribute('data-filter') === filter) {
|
1090 |
+
card.style.display = 'block';
|
1091 |
+
} else {
|
1092 |
+
card.style.display = 'none';
|
1093 |
+
}
|
1094 |
+
});
|
1095 |
+
}
|
1096 |
+
|
1097 |
+
function saveTip() {
|
1098 |
+
const tipId = parseInt(this.closest('.tip-card').getAttribute('data-id'));
|
1099 |
+
const isSaved = savedTips.includes(tipId);
|
1100 |
+
|
1101 |
+
if (isSaved) {
|
1102 |
+
savedTips = savedTips.filter(id => id !== tipId);
|
1103 |
+
this.innerHTML = '<i class="far fa-bookmark"></i>';
|
1104 |
+
} else {
|
1105 |
+
savedTips.push(tipId);
|
1106 |
+
this.innerHTML = '<i class="fas fa-bookmark text-amber-500"></i>';
|
1107 |
+
}
|
1108 |
+
|
1109 |
+
// Prevent event bubbling to the card click event
|
1110 |
+
event.stopPropagation();
|
1111 |
+
}
|
1112 |
+
</script>
|
1113 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Olaiya/timayo" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
1114 |
+
</html>
|
prompts.txt
ADDED
File without changes
|