Spaces:
Running
Running
Update index.html
Browse files- index.html +17 -12
index.html
CHANGED
|
@@ -62,25 +62,22 @@
|
|
| 62 |
<header class="text-center mb-10">
|
| 63 |
<h1 class="text-4xl md:text-5xl font-bold mb-2 glow-text">SweatSculpt Supreme</h1>
|
| 64 |
<p class="text-xl text-gray-300">Your digital yoga and fitness companion</p>
|
| 65 |
-
<div class="flex justify-center mt-4">
|
| 66 |
<div class="w-24 h-1 bg-gradient-to-r from-blue-400 to-green-400 rounded-full"></div>
|
| 67 |
</div>
|
| 68 |
</header>
|
| 69 |
|
| 70 |
<div class="flex flex-col lg:flex-row gap-8">
|
| 71 |
-
<!-- Left Panel - Exercise List -->
|
| 72 |
<div class="w-full lg:w-1/3 bg-gray-800 bg-opacity-70 rounded-xl p-6 shadow-lg">
|
| 73 |
<h2 class="text-2xl font-semibold mb-4 flex items-center">
|
| 74 |
<i data-feather="list" class="mr-2"></i> Workout Plan
|
| 75 |
</h2>
|
| 76 |
<div class="scroll-container max-h-[500px] overflow-y-auto pr-2">
|
| 77 |
<div id="exercise-list" class="space-y-3">
|
| 78 |
-
<
|
| 79 |
-
</div>
|
| 80 |
</div>
|
| 81 |
</div>
|
| 82 |
|
| 83 |
-
<!-- Right Panel - Instructions and Controls -->
|
| 84 |
<div class="w-full lg:w-2/3 bg-gray-800 bg-opacity-70 rounded-xl p-6 shadow-lg">
|
| 85 |
<div class="flex justify-between items-center mb-6">
|
| 86 |
<h2 class="text-2xl font-semibold flex items-center">
|
|
@@ -96,12 +93,10 @@
|
|
| 96 |
</div>
|
| 97 |
</div>
|
| 98 |
|
| 99 |
-
<!-- Exercise Details -->
|
| 100 |
<div id="exercise-instructions" class="bg-gray-700 bg-opacity-50 rounded-lg p-4 mb-6 h-64 overflow-y-auto">
|
| 101 |
<p class="text-gray-300 italic">Select an exercise to begin or click Start Workout</p>
|
| 102 |
</div>
|
| 103 |
|
| 104 |
-
<!-- Timer and Progress -->
|
| 105 |
<div class="bg-gray-700 bg-opacity-50 rounded-lg p-6 mb-6">
|
| 106 |
<div class="flex flex-col md:flex-row justify-between items-center space-y-4 md:space-y-0">
|
| 107 |
<div class="text-center">
|
|
@@ -119,7 +114,6 @@
|
|
| 119 |
</div>
|
| 120 |
</div>
|
| 121 |
|
| 122 |
-
<!-- Progress Bar -->
|
| 123 |
<div class="mb-6">
|
| 124 |
<div class="flex justify-between text-sm text-gray-400 mb-1">
|
| 125 |
<span>Workout Progress</span>
|
|
@@ -130,7 +124,6 @@
|
|
| 130 |
</div>
|
| 131 |
</div>
|
| 132 |
|
| 133 |
-
<!-- Controls -->
|
| 134 |
<div class="flex flex-col sm:flex-row justify-center space-y-3 sm:space-y-0 sm:space-x-4">
|
| 135 |
<button id="start-btn" class="px-8 py-3 bg-gradient-to-r from-blue-500 to-green-500 rounded-full font-bold hover:from-blue-600 hover:to-green-600 transition transform hover:scale-105 shadow-lg">
|
| 136 |
<i data-feather="play" class="mr-2"></i> Start Workout
|
|
@@ -145,7 +138,6 @@
|
|
| 145 |
</div>
|
| 146 |
</div>
|
| 147 |
|
| 148 |
-
<!-- Audio Element for Background Music -->
|
| 149 |
<audio id="background-music" loop>
|
| 150 |
<source src="background.mp3" type="audio/mpeg">
|
| 151 |
</audio>
|
|
@@ -172,6 +164,19 @@
|
|
| 172 |
zoom: 0.65
|
| 173 |
});
|
| 174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 175 |
// Exercise Data
|
| 176 |
const exercises = [
|
| 177 |
// Warm-up
|
|
@@ -183,8 +188,8 @@
|
|
| 183 |
{ name: "Gentle stretching", type: "warmup", duration: 120, tips: "Do not bounce, Feel the stretch" },
|
| 184 |
{ name: "Short break", type: "warmup", duration: 30, tips: "Relax shoulders, Sip water" },
|
| 185 |
|
| 186 |
-
// Suryanamaskar (
|
| 187 |
-
...Array.from({ length:
|
| 188 |
{ name: `Round ${round+1}: Pranamasana`, type: "suryanamaskar", duration: 5, tips: "Focus on breathing, Keep core engaged" },
|
| 189 |
{ name: `Round ${round+1}: Hasta Uttanasana`, type: "suryanamaskar", duration: 5, tips: "Focus on breathing, Keep core engaged" },
|
| 190 |
{ name: `Round ${round+1}: Padahastasana`, type: "suryanamaskar", duration: 5, tips: "Focus on breathing, Keep core engaged" },
|
|
|
|
| 62 |
<header class="text-center mb-10">
|
| 63 |
<h1 class="text-4xl md:text-5xl font-bold mb-2 glow-text">SweatSculpt Supreme</h1>
|
| 64 |
<p class="text-xl text-gray-300">Your digital yoga and fitness companion</p>
|
| 65 |
+
<p id="routine-indicator" class="text-lg text-cyan-300 mt-2"></p> <div class="flex justify-center mt-4">
|
| 66 |
<div class="w-24 h-1 bg-gradient-to-r from-blue-400 to-green-400 rounded-full"></div>
|
| 67 |
</div>
|
| 68 |
</header>
|
| 69 |
|
| 70 |
<div class="flex flex-col lg:flex-row gap-8">
|
|
|
|
| 71 |
<div class="w-full lg:w-1/3 bg-gray-800 bg-opacity-70 rounded-xl p-6 shadow-lg">
|
| 72 |
<h2 class="text-2xl font-semibold mb-4 flex items-center">
|
| 73 |
<i data-feather="list" class="mr-2"></i> Workout Plan
|
| 74 |
</h2>
|
| 75 |
<div class="scroll-container max-h-[500px] overflow-y-auto pr-2">
|
| 76 |
<div id="exercise-list" class="space-y-3">
|
| 77 |
+
</div>
|
|
|
|
| 78 |
</div>
|
| 79 |
</div>
|
| 80 |
|
|
|
|
| 81 |
<div class="w-full lg:w-2/3 bg-gray-800 bg-opacity-70 rounded-xl p-6 shadow-lg">
|
| 82 |
<div class="flex justify-between items-center mb-6">
|
| 83 |
<h2 class="text-2xl font-semibold flex items-center">
|
|
|
|
| 93 |
</div>
|
| 94 |
</div>
|
| 95 |
|
|
|
|
| 96 |
<div id="exercise-instructions" class="bg-gray-700 bg-opacity-50 rounded-lg p-4 mb-6 h-64 overflow-y-auto">
|
| 97 |
<p class="text-gray-300 italic">Select an exercise to begin or click Start Workout</p>
|
| 98 |
</div>
|
| 99 |
|
|
|
|
| 100 |
<div class="bg-gray-700 bg-opacity-50 rounded-lg p-6 mb-6">
|
| 101 |
<div class="flex flex-col md:flex-row justify-between items-center space-y-4 md:space-y-0">
|
| 102 |
<div class="text-center">
|
|
|
|
| 114 |
</div>
|
| 115 |
</div>
|
| 116 |
|
|
|
|
| 117 |
<div class="mb-6">
|
| 118 |
<div class="flex justify-between text-sm text-gray-400 mb-1">
|
| 119 |
<span>Workout Progress</span>
|
|
|
|
| 124 |
</div>
|
| 125 |
</div>
|
| 126 |
|
|
|
|
| 127 |
<div class="flex flex-col sm:flex-row justify-center space-y-3 sm:space-y-0 sm:space-x-4">
|
| 128 |
<button id="start-btn" class="px-8 py-3 bg-gradient-to-r from-blue-500 to-green-500 rounded-full font-bold hover:from-blue-600 hover:to-green-600 transition transform hover:scale-105 shadow-lg">
|
| 129 |
<i data-feather="play" class="mr-2"></i> Start Workout
|
|
|
|
| 138 |
</div>
|
| 139 |
</div>
|
| 140 |
|
|
|
|
| 141 |
<audio id="background-music" loop>
|
| 142 |
<source src="background.mp3" type="audio/mpeg">
|
| 143 |
</audio>
|
|
|
|
| 164 |
zoom: 0.65
|
| 165 |
});
|
| 166 |
|
| 167 |
+
// --- MODIFICATION START ---
|
| 168 |
+
// Auto-detect morning/evening for Suryanamaskar rounds
|
| 169 |
+
const currentHour = new Date().getHours();
|
| 170 |
+
const isEvening = currentHour >= 16; // Evening is defined as 4 PM (16:00) or later
|
| 171 |
+
const suryanamaskarRounds = isEvening ? 6 : 12;
|
| 172 |
+
|
| 173 |
+
// Update UI indicator
|
| 174 |
+
const routineIndicator = document.getElementById('routine-indicator');
|
| 175 |
+
if (routineIndicator) {
|
| 176 |
+
routineIndicator.textContent = `✨ ${isEvening ? 'Evening Routine' : 'Morning Routine'} Activated (${suryanamaskarRounds} Suryanamaskars)`;
|
| 177 |
+
}
|
| 178 |
+
// --- MODIFICATION END ---
|
| 179 |
+
|
| 180 |
// Exercise Data
|
| 181 |
const exercises = [
|
| 182 |
// Warm-up
|
|
|
|
| 188 |
{ name: "Gentle stretching", type: "warmup", duration: 120, tips: "Do not bounce, Feel the stretch" },
|
| 189 |
{ name: "Short break", type: "warmup", duration: 30, tips: "Relax shoulders, Sip water" },
|
| 190 |
|
| 191 |
+
// Suryanamaskar (Dynamic rounds based on time of day)
|
| 192 |
+
...Array.from({ length: suryanamaskarRounds }, (_, round) => [
|
| 193 |
{ name: `Round ${round+1}: Pranamasana`, type: "suryanamaskar", duration: 5, tips: "Focus on breathing, Keep core engaged" },
|
| 194 |
{ name: `Round ${round+1}: Hasta Uttanasana`, type: "suryanamaskar", duration: 5, tips: "Focus on breathing, Keep core engaged" },
|
| 195 |
{ name: `Round ${round+1}: Padahastasana`, type: "suryanamaskar", duration: 5, tips: "Focus on breathing, Keep core engaged" },
|