Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
779 lines (701 loc) · 42.8 KB
/
Copy pathindex.html
File metadata and controls
779 lines (701 loc) · 42.8 KB
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>69kg Recomp Engine</title>
<!-- Tailwind CSS with a customized premium color scheme -->
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
colors: {
obsidian: {
50: '#F9F9FB',
100: '#F1F1F5',
800: '#1A1A1E',
900: '#111115',
950: '#070709'
},
accent: {
gold: '#D4AF37', // Premium gold
champagne: '#EADBB1', // Warm light highlight
sand: '#C5B496', // Muted warm sepia
bronze: '#8C7755'
}
}
}
}
}
</script>
<!-- Google Fonts & Phosphor Icons -->
<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=Cinzel:wght@400;500;600&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap" rel="stylesheet">
<script src="https://unpkg.com/@phosphor-icons/web"></script>
<style>
body {
font-family: 'Plus Jakarta Sans', sans-serif;
background-color: #070709;
color: #F1F1F5;
transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.serif-title {
font-family: 'Cinzel', serif;
}
/* Custom delicate hand-crafted scrollbar */
::-webkit-scrollbar {
width: 4px;
height: 4px;
}
::-webkit-scrollbar-track {
background: rgba(17, 17, 21, 0.3);
}
::-webkit-scrollbar-thumb {
background: #2E2C35;
border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
background: #8C7755;
}
/* Smooth micro-interactive state changes */
.premium-transition {
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-gilded {
background: rgba(17, 17, 21, 0.7);
backdrop-filter: blur(12px);
border: 1px solid rgba(140, 119, 85, 0.15);
}
.card-gilded:hover {
border-color: rgba(212, 175, 55, 0.35);
box-shadow: 0 4px 20px -5px rgba(212, 175, 55, 0.05);
}
</style>
</head>
<body class="bg-[#070709] text-zinc-200 min-h-screen antialiased selection:bg-accent-bronze/30">
<script>
const savedTheme = localStorage.getItem('recomp-theme');
if (savedTheme === 'light') {
document.documentElement.classList.remove('dark');
document.body.style.backgroundColor = '#FAF9F6'; // Warm alabaster instead of harsh solid white
} else {
document.documentElement.classList.add('dark');
}
</script>
<div class="max-w-7xl mx-auto px-6 py-10">
<header class="flex flex-col md:flex-row justify-between items-start md:items-end gap-6 mb-12 pb-8 border-b border-zinc-800/60">
<div>
<div class="flex items-center gap-3 mb-2">
<span class="inline-flex items-center justify-center border border-accent-gold/40 rounded-full p-2.5 shadow-md shadow-accent-gold/5">
<i class="ph ph-heartbeat text-xl text-accent-gold"></i>
</span>
<h1 class="text-3xl font-normal tracking-[0.2em] serif-title text-zinc-100 dark:text-white flex items-center gap-1.5">
RECOMP <span class="text-zinc-500 font-light">ENGINE</span>
</h1>
</div>
<p class="text-xs uppercase tracking-[0.15em] text-accent-sand font-medium">
Sartorial Blueprint: 69<span class="lowercase">kg</span> / 5'8" <span class="mx-2 text-zinc-700">|</span> Deficit Baseline: 2,200 <span class="lowercase">kcal</span>
</p>
</div>
<!-- Custom Controls Area -->
<div class="flex items-center gap-4 w-full md:w-auto self-stretch md:self-auto justify-between md:justify-end">
<!-- Target Protein Gold Badge -->
<div id="badge-protein-status" class="inline-flex items-center gap-2 px-4 py-2 rounded-full text-xs font-semibold tracking-wider uppercase bg-[#111115] border border-zinc-800 text-zinc-300 premium-transition">
<i class="ph ph-barbell text-sm text-accent-gold"></i>
<span id="badge-text">Targeting 140g Protein</span>
</div>
<!-- Custom Luxury Theme Switcher -->
<button onclick="toggleTheme()" class="p-2.5 rounded-full border border-zinc-800 bg-[#111115] text-zinc-400 hover:border-accent-gold hover:text-accent-gold premium-transition" title="Toggle ambiance">
<i id="theme-icon" class="ph ph-moon text-lg dark:hidden"></i>
<i id="theme-icon-dark" class="ph ph-sun text-lg hidden dark:block"></i>
</button>
</div>
</header>
<div class="mb-10">
<label class="block text-[10px] font-bold uppercase tracking-[0.25em] text-accent-sand mb-4">Day Selector</label>
<div class="grid grid-cols-4 sm:grid-cols-7 gap-3">
<button class="day-btn py-4 px-1 rounded-lg text-center font-semibold text-xs tracking-[0.12em] premium-transition border border-zinc-800 bg-[#111115]/50 hover:bg-[#111115]" onclick="switchDay('Mon', this)">MON</button>
<button class="day-btn py-4 px-1 rounded-lg text-center font-semibold text-xs tracking-[0.12em] premium-transition border border-zinc-800 bg-[#111115]/50 hover:bg-[#111115]" onclick="switchDay('Tue', this)">TUE</button>
<button class="day-btn py-4 px-1 rounded-lg text-center font-semibold text-xs tracking-[0.12em] premium-transition border border-zinc-800 bg-[#111115]/50 hover:bg-[#111115]" onclick="switchDay('Wed', this)">WED</button>
<button class="day-btn py-4 px-1 rounded-lg text-center font-semibold text-xs tracking-[0.12em] premium-transition border border-zinc-800 bg-[#111115]/50 hover:bg-[#111115]" onclick="switchDay('Thu', this)">THU</button>
<button class="day-btn py-4 px-1 rounded-lg text-center font-semibold text-xs tracking-[0.12em] premium-transition border border-zinc-800 bg-[#111115]/50 hover:bg-[#111115]" onclick="switchDay('Fri', this)">FRI</button>
<button class="day-btn py-4 px-1 rounded-lg text-center font-semibold text-xs tracking-[0.12em] premium-transition border border-zinc-800 bg-[#111115]/50 hover:bg-[#111115]" onclick="switchDay('Sat', this)">SAT</button>
<button class="day-btn py-4 px-1 rounded-lg text-center font-semibold text-xs tracking-[0.12em] premium-transition border border-zinc-800 bg-[#111115]/50 hover:bg-[#111115]" onclick="switchDay('Sun', this)">SUN</button>
</div>
</div>
<!-- Main Workspace -->
<div class="grid grid-cols-1 lg:grid-cols-12 gap-8 items-start">
<!-- Left Column: Meal Blueprint Options -->
<main class="lg:col-span-7 space-y-6">
<div class="card-gilded rounded-2xl p-6 shadow-sm premium-transition">
<div class="flex items-center justify-between mb-8 pb-4 border-b border-zinc-800">
<div class="flex items-center gap-3">
<i class="ph ph-bowl-food text-xl text-accent-gold"></i>
<h2 class="text-md font-semibold tracking-wider uppercase text-zinc-100">
Daily Diet & Fuel for <span id="current-day-label" class="text-accent-sand">Monday</span>
</h2>
</div>
<!-- Bespoke Action Button -->
<button onclick="openCustomizer()" class="text-[10px] font-bold tracking-widest uppercase text-accent-gold bg-accent-gold/10 hover:bg-accent-gold/20 border border-accent-gold/30 px-3 py-1.5 rounded-md premium-transition">
+ Custom Meal
</button>
</div>
<div id="meals-container" class="space-y-6">
<!-- Dynamic Interactive Meal Swap Cards generated by JS -->
</div>
</div>
</main>
<!-- Right Column: Interactive Concentric SVG Wheel Analytics & Journal checklist -->
<aside class="lg:col-span-5 space-y-6">
<!-- Real-Time Editorial concentric Wheel/Gauges Visualizer -->
<div class="card-gilded rounded-2xl p-6 shadow-sm premium-transition">
<div class="flex items-center justify-between mb-6 pb-4 border-b border-zinc-800">
<div class="flex items-center gap-3">
<i class="ph ph-chart-pie text-xl text-accent-gold"></i>
<h2 class="text-md font-semibold tracking-wider uppercase text-zinc-100">Caloric Ambiance</h2>
</div>
<span class="text-[10px] font-bold tracking-widest text-accent-sand uppercase">Concentric Ring</span>
</div>
<div class="flex flex-col sm:flex-row items-center justify-center gap-6 mb-6">
<!-- Concentric SVG Gauge Rings -->
<div class="relative w-44 h-44 flex items-center justify-center">
<svg class="w-full h-full -rotate-90" viewBox="0 0 120 120">
<!-- Background Track Rings -->
<circle cx="60" cy="60" r="48" fill="transparent" stroke="#1A1A1E" stroke-width="6" />
<circle cx="60" cy="60" r="38" fill="transparent" stroke="#1A1A1E" stroke-width="6" />
<circle cx="60" cy="60" r="28" fill="transparent" stroke="#1A1A1E" stroke-width="6" />
<circle cx="60" cy="60" r="18" fill="transparent" stroke="#1A1A1E" stroke-width="6" />
<!-- Foreground Dynamic Progress Rings (Target calculation linked in Javascript) -->
<!-- Calories (Gold) -->
<circle id="ring-calories" cx="60" cy="60" r="48" fill="transparent" stroke="#D4AF37" stroke-width="6"
stroke-dasharray="301.6" stroke-dashoffset="301.6" stroke-linecap="round" class="transition-all duration-700 ease-out" />
<!-- Protein (Champagne) -->
<circle id="ring-protein" cx="60" cy="60" r="38" fill="transparent" stroke="#EADBB1" stroke-width="6"
stroke-dasharray="238.7" stroke-dashoffset="238.7" stroke-linecap="round" class="transition-all duration-700 ease-out" />
<!-- Carbs (Sand) -->
<circle id="ring-carbs" cx="60" cy="60" r="28" fill="transparent" stroke="#C5B496" stroke-width="6"
stroke-dasharray="175.9" stroke-dashoffset="175.9" stroke-linecap="round" class="transition-all duration-700 ease-out" />
<!-- Fats (Muted Bronze) -->
<circle id="ring-fat" cx="60" cy="60" r="18" fill="transparent" stroke="#8C7755" stroke-width="6"
stroke-dasharray="113.1" stroke-dashoffset="113.1" stroke-linecap="round" class="transition-all duration-700 ease-out" />
</svg>
<!-- Middle percentage info -->
<div class="absolute text-center">
<span id="center-percent" class="text-xl font-bold tracking-tight text-white serif-title">0%</span>
<p class="text-[9px] uppercase tracking-widest text-accent-sand font-medium">Daily Goal</p>
</div>
</div>
<!-- Bespoke Legend -->
<div class="space-y-2.5 w-full sm:w-auto">
<div class="flex items-center gap-2">
<span class="w-3 h-3 rounded-full bg-accent-gold"></span>
<span class="text-xs text-zinc-300 font-medium">Calories: <span id="text-calories-val" class="font-semibold text-white">0</span></span>
</div>
<div class="flex items-center gap-2">
<span class="w-3 h-3 rounded-full bg-accent-champagne"></span>
<span class="text-xs text-zinc-300 font-medium">Protein: <span id="text-protein-val" class="font-semibold text-white">0</span></span>
</div>
<div class="flex items-center gap-2">
<span class="w-3 h-3 rounded-full bg-accent-sand"></span>
<span class="text-xs text-zinc-300 font-medium">Carbs: <span id="text-carbs-val" class="font-semibold text-white">0</span></span>
</div>
<div class="flex items-center gap-2">
<span class="w-3 h-3 rounded-full bg-accent-bronze"></span>
<span class="text-xs text-zinc-300 font-medium">Fats: <span id="text-fat-val" class="font-semibold text-white">0</span></span>
</div>
</div>
</div>
<!-- Sleek minimalist summary lists below concentric circles -->
<div class="space-y-4 pt-4 border-t border-zinc-800">
<div>
<div class="flex justify-between text-xs mb-1">
<span class="text-zinc-400 font-medium">Caloric deficit headroom</span>
<span id="numeric-headroom" class="font-bold text-zinc-100">0 / 2200 kcal</span>
</div>
</div>
</div>
</div>
<!-- Hand-crafted Journal Habit Tracker -->
<div class="card-gilded rounded-2xl p-6 shadow-sm premium-transition">
<div class="flex items-center justify-between mb-6 pb-4 border-b border-zinc-800">
<div class="flex items-center gap-3">
<i class="ph ph-clipboard-text text-xl text-accent-gold"></i>
<h2 class="text-md font-semibold tracking-wider uppercase text-zinc-100">Daily Journal Check</h2>
</div>
<span id="habit-counter" class="text-[10px] font-bold tracking-widest bg-accent-gold/10 text-accent-gold border border-accent-gold/20 px-2.5 py-1 rounded-md">0/4 Done</span>
</div>
<div class="space-y-3 select-none" id="checklist-container">
<!-- Generated dynamically with unique warm minimal design -->
</div>
</div>
</aside>
</div>
</div>
<div id="customizer-drawer" class="fixed inset-0 bg-black/60 backdrop-blur-sm z-50 transition-opacity duration-300 pointer-events-none opacity-0 flex justify-end">
<div class="bg-obsidian-950 border-l border-zinc-800 w-full max-w-md h-full p-8 flex flex-col justify-between shadow-2xl translate-x-full transition-transform duration-300 ease-out" id="customizer-content">
<div>
<div class="flex items-center justify-between mb-8 pb-4 border-b border-zinc-800">
<div class="flex items-center gap-2">
<i class="ph ph-paint-brush text-xl text-accent-gold"></i>
<h2 class="text-lg serif-title tracking-wider text-white">Create Bespoke Dish</h2>
</div>
<button onclick="closeCustomizer()" class="p-1 rounded-full text-zinc-400 hover:text-white transition-colors">
<i class="ph ph-x text-xl"></i>
</button>
</div>
<div class="space-y-6">
<!-- Meal Categorization Select -->
<div class="space-y-2">
<label class="block text-xs uppercase tracking-widest text-accent-sand font-semibold">Select Meal Window</label>
<select id="new-meal-slot" class="w-full bg-[#111115] border border-zinc-800 text-zinc-200 rounded-lg p-3 text-xs focus:border-accent-gold outline-none premium-transition">
<option value="breakfast">Breakfast Selection</option>
<option value="lunch">Lunch Selection</option>
<option value="snack">Pre-Workout Snack</option>
<option value="dinner">Post-Workout Dinner</option>
</select>
</div>
<!-- Custom Meal Title -->
<div class="space-y-2">
<label class="block text-xs uppercase tracking-widest text-accent-sand font-semibold">Dish Name</label>
<input type="text" id="new-meal-name" placeholder="e.g. Sautéed Salmon & Wild Herbs" class="w-full bg-[#111115] border border-zinc-800 text-zinc-100 rounded-lg p-3 text-xs focus:border-accent-gold outline-none premium-transition">
</div>
<!-- Custom Meal Details / Recipe -->
<div class="space-y-2">
<label class="block text-xs uppercase tracking-widest text-accent-sand font-semibold">Recipe Composition</label>
<textarea id="new-meal-text" rows="3" placeholder="Describe ingredients, culinary process, and exact volume weight." class="w-full bg-[#111115] border border-zinc-800 text-zinc-100 rounded-lg p-3 text-xs focus:border-accent-gold outline-none premium-transition resize-none"></textarea>
</div>
<!-- Detailed Macro Sliders with instant readout counters -->
<div class="space-y-5 bg-[#111115]/50 border border-zinc-800/80 rounded-xl p-4">
<div class="space-y-2">
<div class="flex justify-between text-xs">
<span class="text-zinc-400 font-medium">Protein (g)</span>
<span id="slider-protein-val" class="font-bold text-accent-champagne">20g</span>
</div>
<input type="range" min="0" max="100" value="20" id="slider-protein" oninput="updateDrawerCalculations()" class="w-full accent-accent-gold bg-zinc-800 rounded-full h-1 cursor-pointer">
</div>
<div class="space-y-2">
<div class="flex justify-between text-xs">
<span class="text-zinc-400 font-medium">Carbohydrates (g)</span>
<span id="slider-carbs-val" class="font-bold text-accent-sand">20g</span>
</div>
<input type="range" min="0" max="300" value="20" id="slider-carbs" oninput="updateDrawerCalculations()" class="w-full accent-accent-gold bg-zinc-800 rounded-full h-1 cursor-pointer">
</div>
<div class="space-y-2">
<div class="flex justify-between text-xs">
<span class="text-zinc-400 font-medium">Dietary Fats (g)</span>
<span id="slider-fat-val" class="font-bold text-accent-bronze">5g</span>
</div>
<input type="range" min="0" max="100" value="5" id="slider-fat" oninput="updateDrawerCalculations()" class="w-full accent-accent-gold bg-zinc-800 rounded-full h-1 cursor-pointer">
</div>
<!-- Calculated Calories Preview -->
<div class="pt-4 border-t border-zinc-800 flex justify-between items-center">
<span class="text-xs uppercase tracking-wider text-accent-sand font-semibold">Estimated Calories</span>
<span id="slider-cal-estimate" class="text-lg font-bold text-white serif-title">205 kcal</span>
</div>
</div>
</div>
</div>
<div class="flex gap-4">
<button onclick="closeCustomizer()" class="w-1/2 border border-zinc-850 hover:bg-zinc-900 text-zinc-300 text-xs py-3.5 rounded-lg font-semibold tracking-wider uppercase premium-transition">
Discard
</button>
<button onclick="saveBespokeMeal()" class="w-1/2 bg-accent-gold hover:bg-accent-gold/80 text-black text-xs py-3.5 rounded-lg font-bold tracking-widest uppercase premium-transition">
Apply Plate
</button>
</div>
</div>
</div>
<script>
// Rich nutrition database populated with extra high protein swaps (140g+ goal oriented - zero whey/soya)
const mealDatabase = {
breakfast: {
wheyOats: {
name: "Greek Yogurt & Peanut Oatmeal",
text: "60g cooked Oats folded with 150g unsweetened Greek Yogurt, 1.5 tbsp Peanut Butter, 1 banana, 15g Chia seeds, and 10g crushed raw almonds.",
c: 580, p: 38, ch: 66, f: 18,
yt: "https://www.youtube.com/watch?v=vPlWIUH-mLU"
},
oatsEggs: {
name: "Oats & Scrambled Egg Whites",
text: "60g Oats cooked in 250ml double-toned milk paired with 3 boiled egg whites, 1 banana, and 10g raw peanuts.",
c: 540, p: 32, ch: 76, f: 12,
yt: "https://www.youtube.com/watch?v=LInS2D0_O9w"
},
breadOmelette: {
name: "Whole Grain Double-Egg Omelette",
text: "3 Eggs (2 whole + 1 white scrambled with sweet onions) served with 2 slices of toasted Whole Wheat sourdough and 1 glass of cold low-fat milk.",
c: 510, p: 29, ch: 46, f: 19,
yt: "https://www.youtube.com/watch?v=uK481n_G420"
},
paneerToast: {
name: "Paneer Bhurji Sourdough",
text: "80g Fresh low-fat paneer pan-scrambled with onions, turmeric, and crisp capsicum, served on 2 thick slices of whole grain bread with a glass of double-toned milk.",
c: 450, p: 25, ch: 44, f: 16,
yt: "https://www.youtube.com/watch?v=gG1XmCOKxVE"
},
chilla: {
name: "Moong Dal & Savory Paneer Chilla",
text: "2 Golden Moong dal chillas stuffed with 70g grated low-fat paneer, green chilies, coriander, and finely diced red onions.",
c: 410, p: 24, ch: 38, f: 15,
yt: "https://www.youtube.com/watch?v=Uq2gM2_H0K4"
},
soyScramble: {
name: "🍳 Triple Egg & Lean Turkey Bacon Plate",
text: "3 Whole Eggs scrambled with baby spinach and mushrooms, paired with 2 slices of lean Roasted Turkey Bacon and 1 slice of artisanal Sourdough Bread.",
c: 440, p: 35, ch: 25, f: 17,
yt: "https://www.youtube.com/watch?v=F0f1fC3pP98"
}
},
lunch: {
chickenRice: {
name: "Shredded Lemon Chicken & Basmati",
text: "150g Lean Chicken Breast pan-cooked with 1 tsp cold-pressed avocado oil, served with 1.5 cups cooked white rice, 1/2 cup Moong Dal, and a cucumber tomato salad.",
c: 620, p: 48, ch: 82, f: 10,
yt: "https://www.youtube.com/watch?v=ba_1yQGmxTc"
},
paneerRice: {
name: "Tandoori Spiced Paneer & Rice",
text: "120g Fresh Low-Fat Paneer cooked tikka style, served over 1.5 cups steaming Basmati Rice, 1/2 cup cooked Yellow Dal, and raw sliced onions.",
c: 640, p: 28, ch: 78, f: 24,
yt: "https://www.youtube.com/watch?v=Fv15Xf_0Isw"
},
chanaChaat: {
name: "High-Volume Black Chana Garden Salad",
text: "1.5 cups boiled black chana mixed with finely chopped red onions, juicy tomatoes, fresh green chillies, coriander, and fresh key lime juice.",
c: 410, p: 18, ch: 65, f: 6,
yt: "https://www.youtube.com/watch?v=uK1XWlP5Z5A"
},
rajmaRice: {
name: "Country Style Rajma & Basmati Rice",
text: "1.5 cups Kidney Beans (Rajma) prepared in authentic home style gravy, paired with 1.5 cups fluffy White Rice and crisp garden salad.",
c: 530, p: 20, ch: 85, f: 8,
yt: "https://www.youtube.com/watch?v=mD9i4uW7O2U"
},
fishQuinoa: {
name: "Grilled Basa Fillet & Herbed Quinoa",
text: "180g Basa pan-seared with wild herbs and lemon butter glaze, served over 1.2 cups fluffy cooked Quinoa, with a generous serving of roasted broccoli.",
c: 510, p: 42, ch: 48, f: 14,
yt: "https://www.youtube.com/watch?v=ojaxbPRzIHM"
},
soyaChunksRice: {
name: "Beef Sirloin & Fluffy Quinoa",
text: "150g Trimmed lean beef sirloin strips flash-seared with bell peppers and onions, served over 1.5 cups fluffy herbed Quinoa, backed with a fresh side salad.",
c: 540, p: 42, ch: 54, f: 16,
yt: "https://www.youtube.com/watch?v=33m_fWkIs6g"
}
},
snack: {
wheyShake: {
name: "Double-Protein Yogurt & Chia Smoothie",
text: "250g Non-fat Greek Yogurt blended with 100ml skimmed milk, 1.5 tbsp creamy Peanut Butter, 1 tbsp organic honey, and 10g Chia seeds.",
c: 310, p: 32, ch: 22, f: 12,
yt: "https://www.youtube.com/watch?v=g_n0q-p0_8g"
},
sattuBanana: {
name: "Savory Sattu Protein Refresher",
text: "40g Pure Roasted Sattu powder stirred in cold water with pink salt, fresh lemon juice, roasted cumin powder + 1 Medium banana.",
c: 265, p: 11, ch: 50, f: 3,
yt: "https://www.youtube.com/watch?v=68T0j_oG5F4"
},
curdBanana: {
name: "Creamy Curd, Banana & Peanuts",
text: "1.5 cups (250g) Fresh Home-made thick curd + 1 ripe Medium Banana + 15g hand-roasted peanuts for crunch.",
c: 340, p: 14, ch: 42, f: 13,
yt: "https://www.youtube.com/watch?v=D-Z5OnyM0lA"
},
khakhraEgg: {
name: "Crispy Khakhra & Egg Salad",
text: "2 Roasted Diet wheat Khakhras topped with 1 whole boiled egg (chopped), fresh red onions, tomatoes, chaat masala + 1 small banana.",
c: 330, p: 14, ch: 48, f: 8,
yt: "https://www.youtube.com/watch?v=5U9bUmsI46c"
},
eggsBanana: {
name: "Simple Egg White Scramble & Banana",
text: "4 Boiled Eggs (1 whole + 3 whites) served warm with black pepper and pink salt + 1 sweet Medium Banana.",
c: 265, p: 20, ch: 26, f: 9,
yt: "https://www.youtube.com/watch?v=b4O6Nqsc7kY"
},
greekYogurt: {
name: "Honey Greek Yogurt Bowl",
text: "200g High-Protein Zero-Fat Unsweetened Greek Yogurt mixed with 1 tsp honey, 10g pumpkin seeds, and 30g mixed fresh blueberries.",
c: 220, p: 22, ch: 18, f: 5,
yt: "https://www.youtube.com/watch?v=pAnV2b8-15U"
}
},
dinner: {
chickenRiceDinner: {
name: "Post-Workout Chicken, Rice & Curd",
text: "120g Lemon Chicken Breast prepared with 1 tsp ghee + 1.5 cups White Rice + 1 cup freshly set curd + fresh raw cucumber slices.",
c: 580, p: 42, ch: 68, f: 13,
yt: "https://www.youtube.com/watch?v=Vl03qZJor8Q"
},
keemaRice: {
name: "Lean Mutton Keema & Basmati",
text: "120g Low-fat minced lean meat cooked curry style with chopped coriander + 1.5 cups Basmati Rice + Sliced fresh cucumber & red onion.",
c: 610, p: 38, ch: 65, f: 17,
yt: "https://www.youtube.com/watch?v=6YhS7Tsh96M"
},
eggBhurjiRoti: {
name: "Double-protein Egg Bhurji & Wheat Roti",
text: "Egg Bhurji (4 egg whites + 1 whole egg scrambled with capsicum and fresh green coriander) paired perfectly with 2 warm Wheat Rotis.",
c: 480, p: 32, ch: 48, f: 16,
yt: "https://www.youtube.com/watch?v=PtkVihbtT44"
},
paneerWrap: {
name: "Low-Fat Paneer Tikka Tortilla Wrap",
text: "120g Griddled low-fat Paneer chunks wrapped inside a soft thin multigrain flatbread with spiced onions and green mint yogurt sauce.",
c: 460, p: 28, ch: 42, f: 18,
yt: "https://www.youtube.com/watch?v=9jDAszP7k1w"
}
}
};
const defaultSchedule = {
Mon: { b: 'wheyOats', l: 'chickenRice', s: 'wheyShake', d: 'chickenRiceDinner' },
Tue: { b: 'breadOmelette', l: 'fishQuinoa', s: 'greekYogurt', d: 'keemaRice' },
Wed: { b: 'wheyOats', l: 'soyaChunksRice', s: 'eggsBanana', d: 'chickenRiceDinner' },
Thu: { b: 'paneerToast', l: 'chickenRice', s: 'wheyShake', d: 'keemaRice' },
Fri: { b: 'soyScramble', l: 'fishQuinoa', s: 'sattuBanana', d: 'chickenRiceDinner' },
Sat: { b: 'chilla', l: 'chickenRice', s: 'greekYogurt', d: 'keemaRice' },
Sun: { b: 'wheyOats', l: 'paneerRice', s: 'wheyShake', d: 'chickenRiceDinner' }
};
let userSchedule = JSON.parse(localStorage.getItem('recomp-schedule')) || { ...defaultSchedule };
let habitStorage = JSON.parse(localStorage.getItem('recomp-habits')) || {};
let currentDayKey = 'Mon';
const defaultHabits = [
"Ingest 4 Liters of Mineral Water",
"Record 10,000 Step Benchmark",
"Less than 3 tsp Total Cooking Oil",
"Pre-Workout Sodium Hydration Prep"
];
const daysArr = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
daysArr.forEach(day => {
if (!habitStorage[day]) {
habitStorage[day] = [false, false, false, false];
}
});
// Toggle visual themes
function toggleTheme() {
const root = document.documentElement;
if (root.classList.contains('dark')) {
root.classList.remove('dark');
document.body.style.backgroundColor = '#FAF9F6';
localStorage.setItem('recomp-theme', 'light');
} else {
root.classList.add('dark');
document.body.style.backgroundColor = '#070709';
localStorage.setItem('recomp-theme', 'dark');
}
}
// Switch Day selector menu
function switchDay(dayId, btn) {
currentDayKey = dayId;
document.querySelectorAll('.day-btn').forEach(b => {
b.classList.remove('border-accent-gold', 'bg-accent-gold/10', 'text-accent-gold', 'font-bold');
b.classList.add('border-zinc-800', 'bg-[#111115]/50', 'text-zinc-400');
});
btn.classList.remove('border-zinc-800', 'bg-[#111115]/50', 'text-zinc-400');
btn.classList.add('border-accent-gold', 'bg-accent-gold/10', 'text-accent-gold', 'font-bold');
const fullDayNames = {
'Mon': 'Monday', 'Tue': 'Tuesday', 'Wed': 'Wednesday',
'Thu': 'Thursday', 'Fri': 'Friday', 'Sat': 'Saturday', 'Sun': 'Sunday'
};
document.getElementById('current-day-label').innerText = fullDayNames[dayId];
renderMealsAndRoutine();
renderHabitsChecklist();
}
function renderMealsAndRoutine() {
const container = document.getElementById('meals-container');
const activeDaySetup = userSchedule[currentDayKey];
const blocks = [
{ id: 'b', title: 'Breakfast Configuration', db: 'breakfast', icon: 'ph-coffee' },
{ id: 'l', title: 'Mid-Day Fuel', db: 'lunch', icon: 'ph-sun-dim' },
{ id: 's', title: 'Pre-Workout Snack', db: 'snack', icon: 'ph-lightning' },
{ id: 'd', title: 'Post-Workout Dinner', db: 'dinner', icon: 'ph-moon-stars' }
];
let html = '';
blocks.forEach(block => {
const currentItemKey = activeDaySetup[block.id];
const activeItem = mealDatabase[block.db][currentItemKey];
let dropdownOptions = '';
for (let key in mealDatabase[block.db]) {
const selectedAttr = key === currentItemKey ? 'selected' : '';
dropdownOptions += `<option value="${key}" ${selectedAttr}>${mealDatabase[block.db][key].name}</option>`;
}
html += `
<div class="p-5 border border-zinc-800/80 rounded-xl bg-[#111115]/60 hover:border-zinc-700/80 premium-transition">
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-4">
<span class="text-xs font-bold uppercase tracking-widest text-zinc-400 flex items-center gap-2">
<i class="ph ${block.icon} text-accent-gold text-base"></i>
${block.title}
</span>
<select class="text-xs bg-[#070709] text-zinc-300 border border-zinc-850 rounded-lg px-3 py-2 focus:border-accent-gold outline-none cursor-pointer w-full sm:w-auto font-medium" onchange="swapMealOption('${block.id}', this.value)">
${dropdownOptions}
</select>
</div>
<p class="text-xs md:text-[13px] text-zinc-400 leading-relaxed font-light mb-4" id="text-${block.id}">
${activeItem.text}
</p>
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 border-t border-zinc-800/60 pt-3">
<div class="flex flex-wrap items-center gap-2">
<span class="inline-flex items-center gap-1 text-[11px] font-bold text-accent-gold bg-accent-gold/5 px-2.5 py-1 rounded-md border border-accent-gold/10">
${activeItem.c} kcal
</span>
<span class="inline-flex items-center gap-1 text-[11px] font-bold text-accent-champagne bg-accent-champagne/5 px-2.5 py-1 rounded-md border border-accent-champagne/10">
${activeItem.p}g Protein
</span>
<span class="inline-flex items-center gap-1 text-[11px] font-bold text-accent-sand bg-accent-sand/5 px-2.5 py-1 rounded-md border border-accent-sand/10">
${activeItem.ch}g Carbs
</span>
<span class="inline-flex items-center gap-1 text-[11px] font-bold text-accent-bronze bg-accent-bronze/5 px-2.5 py-1 rounded-md border border-accent-bronze/10">
${activeItem.f}g Fats
</span>
</div>
</div>
</div>
`;
});
container.innerHTML = html;
calculateAndRenderAnalytics();
}
function swapMealOption(slotId, newKey) {
userSchedule[currentDayKey][slotId] = newKey;
localStorage.setItem('recomp-schedule', JSON.stringify(userSchedule));
renderMealsAndRoutine();
}
function calculateAndRenderAnalytics() {
let totalC = 0, totalP = 0, totalCh = 0, totalF = 0;
const setup = userSchedule[currentDayKey];
const breakfastObj = mealDatabase.breakfast[setup.b];
const lunchObj = mealDatabase.lunch[setup.l];
const snackObj = mealDatabase.snack[setup.s];
const dinnerObj = mealDatabase.dinner[setup.d];
const currentActiveItems = [breakfastObj, lunchObj, snackObj, dinnerObj];
currentActiveItems.forEach(item => {
totalC += item.c;
totalP += item.p;
totalCh += item.ch;
totalF += item.f;
});
// Numeric counters update
document.getElementById('text-calories-val').innerText = `${totalC} kcal`;
document.getElementById('text-protein-val').innerText = `${totalP}g`;
document.getElementById('text-carbs-val').innerText = `${totalCh}g`;
document.getElementById('text-fat-val').innerText = `${totalF}g`;
document.getElementById('numeric-headroom').innerText = `${totalC} / 2200 kcal`;
// SVG Concentric Circle Stroke-offset update
updateConcentricRing('ring-calories', totalC, 2200, 301.6);
updateConcentricRing('ring-protein', totalP, 140, 238.7);
updateConcentricRing('ring-carbs', totalCh, 245, 175.9);
updateConcentricRing('ring-fat', totalF, 60, 113.1);
// Center Percentage calculator
const overallGoalPercent = Math.min(Math.round(((totalP / 140) * 0.5 + (totalC / 2200) * 0.5) * 100), 100);
document.getElementById('center-percent').innerText = `${overallGoalPercent}%`;
// Protein targets verification
const badge = document.getElementById('badge-protein-status');
const badgeText = document.getElementById('badge-text');
if (totalP >= 140) {
badge.classList.remove('bg-[#111115]', 'text-zinc-300', 'border-zinc-800');
badge.classList.add('bg-accent-gold/10', 'text-accent-gold', 'border-accent-gold/30');
badgeText.innerText = "Protein Target Met (140g+)";
} else {
badge.classList.remove('bg-accent-gold/10', 'text-accent-gold', 'border-accent-gold/30');
badge.classList.add('bg-[#111115]', 'text-zinc-300', 'border-zinc-800');
badgeText.innerText = `Need ${140 - totalP}g more protein`;
}
}
function updateConcentricRing(ringId, current, target, maxStroke) {
const ring = document.getElementById(ringId);
const percent = Math.min(current / target, 1);
const offset = maxStroke - (percent * maxStroke);
ring.style.strokeDashoffset = offset;
}
function renderHabitsChecklist() {
const checkContainer = document.getElementById('checklist-container');
const currentChecklistState = habitStorage[currentDayKey];
let checklistHtml = '';
defaultHabits.forEach((habitText, idx) => {
const isChecked = currentChecklistState[idx];
checklistHtml += `
<div class="flex items-center justify-between p-3.5 border border-zinc-850 rounded-xl bg-[#111115]/40 hover:border-zinc-800 transition-all duration-200 cursor-pointer" onclick="toggleHabitItem(${idx})">
<div class="flex items-center gap-3.5">
<span class="flex items-center justify-center w-5 h-5 rounded-full border ${isChecked ? 'bg-accent-gold border-accent-gold text-black' : 'border-zinc-700 text-transparent'} premium-transition">
<i class="ph ph-check text-xs font-bold"></i>
</span>
<span class="text-xs font-medium tracking-wide ${isChecked ? 'line-through text-zinc-600' : 'text-zinc-300'}">
${habitText}
</span>
</div>
<span class="text-[9px] font-bold uppercase tracking-widest ${isChecked ? 'text-accent-gold' : 'text-zinc-500'}">${isChecked ? 'Done' : 'Open'}</span>
</div>
`;
});
checkContainer.innerHTML = checklistHtml;
const count = currentChecklistState.filter(Boolean).length;
document.getElementById('habit-counter').innerText = `${count}/4 Logged`;
}
function toggleHabitItem(index) {
const currentActiveDayState = habitStorage[currentDayKey];
currentActiveDayState[index] = !currentActiveDayState[index];
habitStorage[currentDayKey] = currentActiveDayState;
localStorage.setItem('recomp-habits', JSON.stringify(habitStorage));
renderHabitsChecklist();
}
function openCustomizer() {
const drawer = document.getElementById('customizer-drawer');
const content = document.getElementById('customizer-content');
drawer.classList.remove('pointer-events-none', 'opacity-0');
content.classList.remove('translate-x-full');
updateDrawerCalculations();
}
function closeCustomizer() {
const drawer = document.getElementById('customizer-drawer');
const content = document.getElementById('customizer-content');
drawer.classList.add('pointer-events-none', 'opacity-0');
content.classList.add('translate-x-full');
}
function updateDrawerCalculations() {
const p = parseInt(document.getElementById('slider-protein').value);
const c = parseInt(document.getElementById('slider-carbs').value);
const f = parseInt(document.getElementById('slider-fat').value);
document.getElementById('slider-protein-val').innerText = `${p}g`;
document.getElementById('slider-carbs-val').innerText = `${c}g`;
document.getElementById('slider-fat-val').innerText = `${f}g`;
const calories = (p * 4) + (c * 4) + (f * 9);
document.getElementById('slider-cal-estimate').innerText = `${calories} kcal`;
}
function saveBespokeMeal() {
const slot = document.getElementById('new-meal-slot').value;
const name = document.getElementById('new-meal-name').value.trim() || "Bespoke Meal Config";
const text = document.getElementById('new-meal-text').value.trim() || "Hand-crafted caloric recipe";
const p = parseInt(document.getElementById('slider-protein').value);
const ch = parseInt(document.getElementById('slider-carbs').value);
const f = parseInt(document.getElementById('slider-fat').value);
const c = (p * 4) + (ch * 4) + (f * 9);
const customKey = `custom_${Date.now()}`;
mealDatabase[slot][customKey] = {
name: `✨ ${name}`,
text: text,
c: c, p: p, ch: ch, f: f,
yt: "https://www.youtube.com"
};
userSchedule[currentDayKey][slot === 'breakfast' ? 'b' : slot === 'lunch' ? 'l' : slot === 'snack' ? 's' : 'd'] = customKey;
localStorage.setItem('recomp-schedule', JSON.stringify(userSchedule));
// Reset Inputs
document.getElementById('new-meal-name').value = '';
document.getElementById('new-meal-text').value = '';
closeCustomizer();
renderMealsAndRoutine();
}
// Initialize application state
window.addEventListener('DOMContentLoaded', () => {
const firstDayButton = document.querySelector('.grid button');
if (firstDayButton) {
switchDay('Mon', firstDayButton);
}
});
</script>
</body>
</html>