Spaces:
Running
Running
Add 2 files
Browse filesFiles changed (2)
- index.html+796-701
- prompts.txt+2-3
48 unmodified lines4950515253545546 unmodified lines10210310410510610785 unmodified lines19319419519619719819920020120220320420520620720845 unmodified lines2542552562572582592602615 unmodified lines26726826927027127227327478 unmodified lines3533543553563573583593603613623633643653663673683694 unmodified lines37437537637737837938011 unmodified lines39239339439539639739811 unmodified lines41041141241341441541611 unmodified lines42842943043143243343443510 unmodified lines44644744844945045145245310 unmodified lines46446546646746846947047110 unmodified lines48248348448548648748848910 unmodified lines50050150250350450550650710 unmodified lines51851952052152252352452510 unmodified lines53653753853954054154254310 unmodified lines55455555655755855956056110 unmodified lines57257357457557657757857910 unmodified lines59059159259359459552 unmodified lines64864965065165265365442 unmodified lines6976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137648 unmodified lines}.routine-item.dragging {opacity: 0.5;background-color: #d1fae5;}.routine-scroll-container {display: flex;46 unmodified linesfrom { opacity: 0; transform: translateY(-20px); }to { opacity: 1; transform: translateY(0); }}</style></head><body class="font-sans bg-gray-50">85 unmodified lines<span id="next-activity" class="text-xl font-semibold text-gray-700">Next: Stretch</span><p id="current-activity" class="text-gray-600 text-sm">You're currently working. Your next break is scheduled soon.</p></div><div class="relative w-32 h-32"><svg class="w-full h-full" viewBox="0 0 100 100"><!-- Background circle --><circle class="text-gray-200" stroke-width="8" stroke="currentColor" fill="transparent" r="40" cx="50" cy="50" /><!-- Progress circle --><circle id="progress-circle" class="text-primary" stroke-width="8" stroke-dasharray="251.2" stroke-dashoffset="125.6" stroke-linecap="round" stroke="currentColor" fill="transparent" r="40" cx="50" cy="50" /></svg><div class="absolute inset-0 flex items-center justify-center"><span id="time-remaining" class="text-2xl font-bold text-primary">24:30</span></div></div><div class="flex space-x-4 mt-4"><button id="skip-btn" class="bg-white hover:bg-gray-100 text-gray-800 p-3 rounded-lg border border-gray-300 flex items-center justify-center" title="Skip">45 unmodified lines<!-- My Routine Section --><div class="bg-white rounded-xl shadow-md p-6 mb-8"><div class="flex justify-between items-center mb-6"><div><h2 class="text-2xl font-bold text-gray-800">My Wellness Routine</h2><div class="flex items-center mt-2"><select id="routine-selector" class="border border-gray-300 rounded-lg px-3 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary">5 unmodified lines<span class="ml-3 text-sm text-gray-600">Total time: <span id="routine-total-time">5</span> min</span></div></div><button id="save-routine" class="bg-primary hover:bg-secondary text-white px-4 py-2 rounded-lg text-sm">Save Routine</button></div><div id="routine-container" class="routine-scroll-container">78 unmodified lines</div></div><!-- Exercise Library --><div class="bg-white rounded-xl shadow-md p-6 mb-8"><div class="flex flex-col md:flex-row md:items-center md:justify-between mb-6"><h2 class="text-2xl font-bold text-gray-800 mb-4 md:mb-0">Exercise Library</h2><div class="flex flex-col sm:flex-row gap-3"><div class="relative"><input type="text" id="exercise-search" placeholder="Search exercises..." class="pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent w-full"><i class="fas fa-search absolute left-3 top-3 text-gray-400"></i></div><select id="exercise-filter" class="px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"><option value="all">All Exercises</option><option value="favorites">Favorites</option><option value="stretching">Stretching</option><option value="breathing">Breathing</option>4 unmodified lines</div></div><div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6" id="exercise-container"><!-- Exercise Card 1 --><div class="exercise-card bg-light rounded-lg overflow-hidden" data-category="stretching"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-hands-helping text-white text-5xl animate-pulse-slow"></i>11 unmodified lines</div></div><!-- Exercise Card 2 --><div class="exercise-card bg-light rounded-lg overflow-hidden" data-category="breathing"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-lungs text-white text-5xl animate-pulse-slow"></i>11 unmodified lines</div></div><!-- Exercise Card 3 --><div class="exercise-card bg-light rounded-lg overflow-hidden" data-category="stretching"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-hands text-white text-5xl animate-pulse-slow"></i>11 unmodified lines</div></div><!-- Exercise Card 4 --><div class="exercise-card bg-light rounded-lg overflow-hidden" data-category="yoga"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-chair text-white text-5xl animate-pulse-slow"></i><button class="favorite-btn absolute top-3 right-3 text-white hover:text-yellow-300 text-xl">10 unmodified lines</div></div><!-- Exercise Card 5 --><div class="exercise-card bg-light rounded-lg overflow-hidden" data-category="eye"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-eye text-white text-5xl animate-pulse-slow"></i><button class="favorite-btn absolute top-3 right-3 text-white hover:text-yellow-300 text-xl">10 unmodified lines</div></div><!-- Exercise Card 6 --><div class="exercise-card bg-light rounded-lg overflow-hidden" data-category="hydration"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-water text-white text-5xl animate-pulse-slow"></i><button class="favorite-btn absolute top-3 right-3 text-white hover:text-yellow-300 text-xl">10 unmodified lines</div></div><!-- Exercise Card 7 --><div class="exercise-card bg-light rounded-lg overflow-hidden" data-category="stretching"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-arrows-alt-h text-white text-5xl animate-pulse-slow"></i><button class="favorite-btn absolute top-3 right-3 text-white hover:text-yellow-300 text-xl">10 unmodified lines</div></div><!-- Exercise Card 8 --><div class="exercise-card bg-light rounded-lg overflow-hidden" data-category="stretching"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-undo text-white text-5xl animate-pulse-slow"></i><button class="favorite-btn absolute top-3 right-3 text-white hover:text-yellow-300 text-xl">10 unmodified lines</div></div><!-- Exercise Card 9 --><div class="exercise-card bg-light rounded-lg overflow-hidden" data-category="strength"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-dumbbell text-white text-5xl animate-pulse-slow"></i><button class="favorite-btn absolute top-3 right-3 text-white hover:text-yellow-300 text-xl">10 unmodified lines</div></div><!-- Exercise Card 10 --><div class="exercise-card bg-light rounded-lg overflow-hidden" data-category="stretching"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-running text-white text-5xl animate-pulse-slow"></i><button class="favorite-btn absolute top-3 right-3 text-white hover:text-yellow-300 text-xl">10 unmodified lines</div></div><!-- Exercise Card 11 --><div class="exercise-card bg-light rounded-lg overflow-hidden" data-category="stretching"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-hands-praying text-white text-5xl animate-pulse-slow"></i><button class="favorite-btn absolute top-3 right-3 text-white hover:text-yellow-300 text-xl">10 unmodified lines</div></div><!-- Exercise Card 12 --><div class="exercise-card bg-light rounded-lg overflow-hidden" data-category="breathing"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-wind text-white text-5xl animate-pulse-slow"></i><button class="favorite-btn absolute top-3 right-3 text-white hover:text-yellow-300 text-xl">10 unmodified lines</div></div></div></div></main></div>52 unmodified lines<div class="h-24 bg-primary rounded" style="height: 80%;"></div></div><div class="text-center"><div class="text-xs text-gray-500 mb-1">Wed</div><div class="h-24 bg-primary rounded" style="height: 45%;"></div></div><div class="text-center">42 unmodified lines</div><div class="bg-light rounded-lg p-4"><h5 class="font-medium text-gray-700 mb-2">Eye Exercises</h5><div class="text-3xl font-bold text-primary mb-2">12</div><div class="text-sm text-gray-500">+4 from last week</div></div></div></div><!-- Achievements --><div><h4 class="text-xl font-semibold text-gray-800 mb-4">Achievements</h4><div class="grid grid-cols-2 sm:grid-cols-3 gap-4"><div class="bg-yellow-50 border border-yellow-100 rounded-lg p-3 text-center"><div class="text-yellow-500 mb-2"><i class="fas fa-trophy text-2xl"></i></div><h5 class="font-medium text-gray-700 mb-1">5-Day Streak</h5><p class="text-xs text-gray-500">Completed all breaks for 5 days</p></div><div class="bg-blue-50 border border-blue-100 rounded-lg p-3 text-center"><div class="text-blue-500 mb-2"><i class="fas fa-check-circle text-2xl"></i></div><h5 class="font-medium text-gray-700 mb-1">Hydration Pro</h5><p class="text-xs text-gray-500">Drank 2L+ for 3 days</p></div><div class="bg-purple-50 border border-purple-100 rounded-lg p-3 text-center"><div class="text-purple-500 mb-2"><i class="fas fa-star text-2xl"></i></div><h5 class="font-medium text-gray-700 mb-1">Stretch Master</h5><p class="text-xs text-gray-500">Completed 20+ stretches</p></div></div></div></div></div></div><!-- Save Routine Modal --><div id="save-routine-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden z-50"><div class="bg-white rounded-xl shadow-2xl w-full max-w-md max-h-[90vh] overflow-y-auto"><div class="p-6 border-b border-gray-200 flex justify-between items-center"><h3 class="text-2xl font-bold text-gray-800">Save Your Routine</h3><button id="close-save-routine" class="text-gray-500 hover:text-gray-700"><i class="fas fa-times text-xl"></i></button></div><div class="p-6"><div class="mb-6"><label class="block text-gray-700 font-medium mb-2">Routine Name</label><input type="text" id="routine-name" placeholder="e.g. Morning Refresh" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"></div><div class="mb-6"><label class="block text-gray-700 font-medium mb-2">Description</label><textarea id="routine-description" placeholder="Brief description of your routine" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent h-24"></textarea></div><div class="mb-6"><h4 class="text-lg font-semibold text-gray-800 mb-3">Routine Summary</h4><div class="bg-light rounded-lg p-4"><div class="flex justify-between items-center mb-3"><span class="font-medium text-gray-700">Total Time:</span><span class="font-bold text-primary">5 minutes</span></div><div class="mb-3"><span class="font-medium text-gray-700">Activities Included:</span><div class="flex flex-wrap gap-2 mt-2"><div class="flex items-center bg-white px-3 py-1 rounded-full text-sm"><div class="activity-icon mr-2"><i class="fas fa-hands-helping text-xs"></i></div>Stretching</div><div class="flex items-center bg-white px-3 py-1 rounded-full text-sm"><div class="activity-icon mr-2"><i class="fas fa-lungs text-xs"></i></div>Breathing</div><div class="flex items-center bg-white px-3 py-1 rounded-full text-sm"><div class="activity-icon mr-2"><i class="fas fa-eye text-xs"></i></div>Eye Care</div></div></div><div><span class="font-medium text-gray-700">Exercises:</span><ul class="list-disc list-inside text-sm text-gray-600 mt-1 pl-2"><li>Neck Stretches (2 min)</li><li>Deep Breathing (1 min)</li><li>Eye Exercises (2 min)</li></ul></div></div></div></div><div class="p-6 border-t border-gray-200 flex justify-end"><button id="confirm-save-routine" class="bg-primary hover:bg-secondary text-white px-6 py-2 rounded-lg font-medium">Save Routine</button></div></div></div><!-- Break Notification --><div id="break-notification" class="fixed bottom-4 right-4 bg-white rounded-xl shadow-2xl p-6 max-w-sm hidden z-50"><div class="flex justify-between items-start mb-4"><h3 class="text-xl font-bold text-gray-800">Time for a Break!</h3><button id="close-notification" class="text-gray-500 hover:text-gray-700"><i class="fas fa-times"></i></button></div><p class="text-gray-600 mb-6">You've been working for 45 minutes. Let's do some neck stretches to relieve tension.</p><div class="flex space-x-3"><button id="snooze-break" class="bg-white hover:bg-gray-100 text-gray-800 px-4 py-2 rounded-lg border border-gray-300">Snooze (5 min)</button><button id="start-break" class="bg-primary hover:bg-secondary text-white px-4 py-2 rounded-lg">Start Break</button></div></div><script>// Auth statelet currentUser = null;let isAuthenticated = false;let isTimerPaused = false;// DOM Elementsconst authModal = document.getElementById('auth-modal');const closeAuth = document.getElementById('close-auth');const loginForm = document.getElementById('login-form');const signupForm = document.getElementById('signup-form');const showSignup = document.getElementById('show-signup');const showLogin = document.getElementById('show-login');const loginBtn = document.getElementById('login-btn');const signupBtn = document.getElementById('signup-btn');const logoutBtn = document.getElementById('logout-btn');const mainContent = document.getElementById('main-content');const profileBtn = document.getElementById('profile-btn');const avatar = document.getElementById('avatar');const usernameDisplay = document.getElementById('username');const settingsBtn = document.getElementById('settings-btn');const settingsModal = document.getElementById('settings-modal');const closeSettings = document.getElementById('close-settings');const saveSettings = document.getElementById('save-settings');const statsBtn = document.getElementById('stats-btn');const statsModal = document.getElementById('stats-modal');const closeStats = document.getElementById('close-stats');const breakNotification = document.getElementById('break-notification');const closeNotification = document.getElementById('close-notification');const snoozeBreak = document.getElementById('snooze-break');const startBreak = document.getElementById('start-break');const takeBreakNow = document.getElementById('take-break-now');const skipBtn = document.getElementById('skip-btn');const pauseBtn = document.getElementById('pause-btn');// Routine elementsconst routineContainer = document.getElementById('routine-container');const emptyRoutineMessage = document.getElementById('empty-routine-message');const saveRoutineBtn = document.getElementById('save-routine');const routineSelector = document.getElementById('routine-selector');const routineTotalTime = document.getElementById('routine-total-time');// Add to routine modal elementsconst addToRoutineModal = document.getElementById('add-to-routine-modal');const closeAddToRoutine = document.getElementById('close-add-to-routine');const confirmAddToRoutine = document.getElementById('confirm-add-to-routine');const targetRoutine = document.getElementById('target-routine');const exerciseDuration = document.getElementById('exercise-duration');// Save routine modal elementsconst saveRoutineModal = document.getElementById('save-routine-modal');const closeSaveRoutine = document.getElementById('close-save-routine');const confirmSaveRoutine = document.getElementById('confirm-save-routine');// Exercise library elementsconst exerciseSearch = document.getElementById('exercise-search');const exerciseFilter = document.getElementById('exercise-filter');const exerciseContainer = document.getElementById('exercise-container');// Timer variableslet workDuration = 45 * 60; // 45 minutes in secondslet breakDuration = 5 * 60; // 5 minutes in secondslet timeLeft = workDuration;let timer;let isWorking = true;// Current exercise being added to routinelet currentExerciseToAdd = null;// Sample routines dataconst routines = {morning: {name: "Morning Routine",description: "Start your day with energy and focus",exercises: [{ title: "Neck Stretches", duration: "2 min", icon: "hands-helping" },{ title: "Deep Breathing", duration: "1 min", icon: "lungs" },{ title: "Eye Exercises", duration: "2 min", icon: "eye" }]},afternoon: {name: "Afternoon Routine",description: "Recharge during your midday slump",exercises: [{ title: "Chair Yoga", duration: "3 min", icon: "chair" },{ title: "Wrist & Finger", duration: "2 min", icon: "hands" }]},evening: {name: "Evening Routine",description: "Wind down after work",exercises: [{ title: "Deep Breathing", duration: "2 min", icon: "lungs" },{ title: "Shoulder Rolls", duration: "1 min", icon: "hands-praying" }]},custom: {name: "Custom Routine",description: "Your personalized wellness routine",exercises: []}};// Initialize SortableJS for drag and drop routine itemsnew Sortable(routineContainer, {animation: 150,handle: '.activity-icon',ghostClass: 'dragging',onEnd: function() {updateEmptyRoutineMessage();updateRoutineStats();}});// Show auth modal on page loadwindow.addEventListener('load', () => {authModal.classList.remove('hidden');});// Auth modal handlerscloseAuth.addEventListener('click', () => {if (!isAuthenticated) return; // Don't allow closing if not authenticatedauthModal.classList.add('hidden');});showSignup.addEventListener('click', () => {loginForm.classList.add('hidden');signupForm.classList.remove('hidden');});showLogin.addEventListener('click', () => {signupForm.classList.add('hidden');loginForm.classList.remove('hidden');});loginBtn.addEventListener('click', () => {const email = document.getElementById('login-email').value;const password = document.getElementById('login-password').value;if (!email || !password) {alert('Please enter both email and password');return;}// In a real app, you would validate credentials with a backendcurrentUser = {name: email.split('@')[0],email: email};isAuthenticated = true;// Update UIavatar.textContent = currentUser.name.charAt(0).toUpperCase();usernameDisplay.textContent = currentUser.name;// Hide auth modal and show main contentauthModal.classList.add('hidden');mainContent.classList.remove('hidden');});signupBtn.addEventListener('click', () => {const name = document.getElementById('signup-name').value;const email = document.getElementById('signup-email').value;const password = document.getElementById('signup-password').value;const confirmPassword = document.getElementById('signup-confirm-password').value;if (!name || !email || !password || !confirmPassword) {alert('Please fill in all fields');return;}if (password !== confirmPassword) {alert('Passwords do not match');return;}// In a real app, you would create the account with a backendcurrentUser = {name: name,email: email};isAuthenticated = true;// Update UIavatar.textContent = currentUser.name.charAt(0).toUpperCase();usernameDisplay.textContent = currentUser.name;// Hide auth modal and show main contentauthModal.classList.add('hidden');mainContent.classList.remove('hidden');});logoutBtn.addEventListener('click', () => {isAuthenticated = false;currentUser = null;mainContent.classList.add('hidden');authModal.classList.remove('hidden');});// Modal handlersstatsBtn.addEventListener('click', () => {statsModal.classList.remove('hidden');});closeStats.addEventListener('click', () => {statsModal.classList.add('hidden');});// Routine selector handlerroutineSelector.addEventListener('change', function() {loadRoutine(this.value);});// Save routine handlerssaveRoutineBtn.addEventListener('click', () => {saveRoutineModal.classList.remove('hidden');updateRoutineStats();});closeSaveRoutine.addEventListener('click', () => {saveRoutineModal.classList.add('hidden');});confirmSaveRoutine.addEventListener('click', () => {const routineName = document.getElementById('routine-name').value;const routineDescription = document.getElementById('routine-description').value;if (!routineName) {alert('Please enter a name for your routine');return;}// In a real app, you would save the routine to localStorage or a backendalert(`Routine "${routineName}" saved successfully!`);saveRoutineModal.classList.add('hidden');// Update the routine selectorconst newOption = document.createElement('option');newOption.value = routineName.toLowerCase().replace(/\s+/g, '-');newOption.textContent = routineName;routineSelector.appendChild(newOption);routineSelector.value = newOption.value;});// Add to routine modal handlerscloseAddToRoutine.addEventListener('click', () => {addToRoutineModal.classList.add('hidden');currentExerciseToAdd = null;});confirmAddToRoutine.addEventListener('click', () => {if (!currentExerciseToAdd) return;const duration = exerciseDuration.value || '2';const routineId = targetRoutine.value;// Add to the selected routineconst exerciseCard = currentExerciseToAdd.closest('.exercise-card');const title = exerciseCard.querySelector('h3').textContent;const icon = exerciseCard.querySelector('.fa-3x').classList[1].replace('fa-', '');// In a real app, you would add to the routine data structureaddToRoutine(title, duration + ' min', icon);addToRoutineModal.classList.add('hidden');currentExerciseToAdd = null;});// Notification handlerscloseNotification.addEventListener('click', () => {breakNotification.classList.add('hidden');});snoozeBreak.addEventListener('click', () => {breakNotification.classList.add('hidden');// Snooze for 5 minutestimeLeft = 5 * 60;startTimer();});startBreak.addEventListener('click', () => {breakNotification.classList.add('hidden');isWorking = false;timeLeft = breakDuration;updateActivityDisplay("Take a Break", "Time to stretch and relax!");startTimer();});// Dashboard button handlerstakeBreakNow.addEventListener('click', () => {isWorking = false;timeLeft = breakDuration;updateActivityDisplay("Take a Break", "Time to stretch and relax!");startTimer();});skipBtn.addEventListener('click', () => {isWorking = true;timeLeft = workDuration;updateActivityDisplay("Focus Time", "You're currently working. Your next break is scheduled soon.");startTimer();});pauseBtn.addEventListener('click', () => {if (isTimerPaused) {// Resume timerisTimerPaused = false;pauseBtn.innerHTML = '<i class="fas fa-pause"></i>';pauseBtn.title = "Pause";startTimer();} else {// Pause timerisTimerPaused = true;clearInterval(timer);pauseBtn.innerHTML = '<i class="fas fa-play"></i>';pauseBtn.title = "Resume";}});// Add event listeners to all "Add to Routine" buttonsdocument.querySelectorAll('.add-to-routine').forEach(button => {button.addEventListener('click', function() {currentExerciseToAdd = this;addToRoutineModal.classList.remove('hidden');// Set default duration based on exerciseconst durationText = this.closest('.exercise-card').querySelector('.text-sm.text-gray-500').textContent;const defaultDuration = durationText.includes('min') ? durationText.split(' ')[0] : '2';exerciseDuration.value = defaultDuration;});});// Add event listeners to all favorite buttonsdocument.querySelectorAll('.favorite-btn').forEach(button => {button.addEventListener('click', function() {this.classList.toggle('active');const icon = this.querySelector('i');if (icon.classList.contains('far')) {icon.classList.remove('far');icon.classList.add('fas');} else {icon.classList.remove('fas');icon.classList.add('far');}// In a real app, you would save the favorite status});});// Add event listeners to all remove buttons in routine itemsroutineContainer.addEventListener('click', function(e) {if (e.target.closest('.routine-item') && e.target.closest('.fa-times')) {e.target.closest('.routine-item').remove();updateEmptyRoutineMessage();updateRoutineStats();}});function loadRoutine(routineId) {routineContainer.innerHTML = '';const routine = routines[routineId];if (!routine) return;routine.exercises.forEach(exercise => {addToRoutine(exercise.title, exercise.duration, exercise.icon);});updateEmptyRoutineMessage();updateRoutineStats();}function addToRoutine(title, duration, icon) {emptyRoutineMessage.classList.add('hidden');const routineItem = document.createElement('div');routineItem.className = 'routine-item bg-light rounded-lg p-3 flex flex-col border border-gray-200';routineItem.innerHTML = `<div class="flex items-center justify-between mb-2"><div class="activity-icon"><i class="fas fa-${icon} text-xs"></i></div><button class="text-gray-400 hover:text-red-500 text-sm"><i class="fas fa-times"></i></button></div><h3 class="font-semibold text-gray-800 text-sm mb-1">${title}</h3><p class="text-xs text-gray-500">${duration}</p>`;routineContainer.appendChild(routineItem);updateRoutineStats();}function updateEmptyRoutineMessage() {if (routineContainer.children.length === 0) {emptyRoutineMessage.classList.remove('hidden');} else {emptyRoutineMessage.classList.add('hidden');}}function updateRoutineStats() {let totalTime = 0;const exercises = [];const activityTypes = new Set();document.querySelectorAll('.routine-item').forEach(item => {const durationText = item.querySelector('.text-xs.text-gray-500').textContent;const duration = parseInt(durationText) || 0;totalTime += duration;const title = item.querySelector('h3').textContent;exercises.push(title + ' (' + durationText + ')');const iconClass = item.querySelector('.activity-icon i').classList[1];if (iconClass.includes('hands')) activityTypes.add('Stretching');if (iconClass.includes('lungs')) activityTypes.add('Breathing');if (iconClass.includes('eye')) activityTypes.add('Eye Care');if (iconClass.includes('chair')) activityTypes.add('Yoga');if (iconClass.includes('water')) activityTypes.add('Hydration');});// Update the total time displayroutineTotalTime.textContent = totalTime;// Update the summary in the save modalif (saveRoutineModal) {const totalTimeElement = saveRoutineModal.querySelector('.bg-light .font-bold.text-primary');if (totalTimeElement) {totalTimeElement.textContent = totalTime + ' minutes';}const activitiesContainer = saveRoutineModal.querySelector('.flex-wrap.gap-2');if (activitiesContainer) {activitiesContainer.innerHTML = '';activityTypes.forEach(type => {let icon = 'spa';if (type === 'Stretching') icon = 'hands-helping';if (type === 'Breathing') icon = 'lungs';if (type === 'Eye Care') icon = 'eye';if (type === 'Yoga') icon = 'chair';if (type === 'Hydration') icon = 'water';const activityPill = document.createElement('div');activityPill.className = 'flex items-center bg-white px-3 py-1 rounded-full text-sm';activityPill.innerHTML = `<div class="activity-icon mr-2"><i class="fas fa-${icon} text-xs"></i></div>${type}`;activitiesContainer.appendChild(activityPill);});}const exercisesList = saveRoutineModal.querySelector('.list-disc');if (exercisesList) {exercisesList.innerHTML = exercises.map(ex => `<li>${ex}</li>`).join('');}}}// Exercise library search and filterexerciseSearch.addEventListener('input', filterExercises);exerciseFilter.addEventListener('change', filterExercises);function filterExercises() {const searchTerm = exerciseSearch.value.toLowerCase();const filterValue = exerciseFilter.value;document.querySelectorAll('.exercise-card').forEach(card => {const title = card.querySelector('h3').textContent.toLowerCase();const description = card.querySelector('p').textContent.toLowerCase();const category = card.dataset.category;const isFavorite = card.querySelector('.favorite-btn').classList.contains('active');const matchesSearch = title.includes(searchTerm) || description.includes(searchTerm);const matchesFilter = filterValue === 'all' ||(filterValue === 'favorites' && isFavorite) ||(filterValue !== 'favorites' && category === filterValue);if (matchesSearch && matchesFilter) {card.style.display = 'block';} else {card.style.display = 'none';}});}// Timer functionsfunction startTimer() {if (isTimerPaused) return;clearInterval(timer);timer = setInterval(updateTimer, 1000);}function updateTimer() {if (isTimerPaused) return;timeLeft--;if (timeLeft <= 0) {clearInterval(timer);if (isWorking) {// Time for a breakbreakNotification.classList.remove('hidden');} else {// Break is over, back to workisWorking = true;timeLeft = workDuration;updateActivityDisplay("Focus Time", "You're currently working. Your next break is scheduled soon.");startTimer();}}updateTimerDisplay();}function updateTimerDisplay() {const minutes = Math.floor(timeLeft / 60);const seconds = timeLeft % 60;document.getElementById('time-remaining').textContent =`${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;// Update progress circleconst totalTime = isWorking ? workDuration : breakDuration;const progress = (totalTime - timeLeft) / totalTime;const circumference = 251.2; // 2 * π * r (where r=40)const offset = circumference - (progress * circumference);document.getElementById('progress-circle').style.strokeDashoffset = offset;}function updateActivityDisplay(nextActivity, currentActivity) {document.getElementById('next-activity').textContent = `Next: ${nextActivity}`;document.getElementById('current-activity').innerHTML = `<p class="text-gray-600">${currentActivity}</p>`;}// InitializeupdateActivityDisplay("Stretch", "You're currently working. Your next break is scheduled soon.");startTimer();updateEmptyRoutineMessage();loadRoutine('morning');// Set one exercise as favorite by default for demodocument.querySelector('.exercise-card[data-category="eye"] .favorite-btn').classList.add('active');</script><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=tframe/deskrefresh" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>48 unmodified lines4950515253545546 unmodified lines10210310410510610710810911011111211311411511685 unmodified lines20220320420520620720820921021121221321421521621721821922022122222322422545 unmodified lines2712722732742752762772785 unmodified lines28428528628728828929029178 unmodified lines3703713723733743753763773783793803813823833843853864 unmodified lines39139239339439539639711 unmodified lines40941041141241341441511 unmodified lines42742842943043143243311 unmodified lines44544644744844945045145210 unmodified lines46346446546646746846947010 unmodified lines48148248348448548648748810 unmodified lines49950050150250350450550610 unmodified lines51751851952052152252352410 unmodified lines53553653753853954054154210 unmodified lines55355455555655755855956010 unmodified lines57157257357457557657757810 unmodified lines58959059159259359459559610 unmodified lines60760860961061161261361461561661752 unmodified lines67067167267367467567642 unmodified lines719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147148 unmodified lines}.routine-item.dragging {opacity: 0.5;background-color: '#d1fae5';}.routine-scroll-container {display: flex;46 unmodified linesfrom { opacity: 0; transform: translateY(-20px); }to { opacity: 1; transform: translateY(0); }}.timer-adjust-btn {transition: all 0.2s ease;}.timer-adjust-btn:active {transform: scale(0.95);}.hidden-row {display: none;}</style></head><body class="font-sans bg-gray-50">85 unmodified lines<span id="next-activity" class="text-xl font-semibold text-gray-700">Next: Stretch</span><p id="current-activity" class="text-gray-600 text-sm">You're currently working. Your next break is scheduled soon.</p></div><div class="flex items-center"><button id="decrease-time" class="timer-adjust-btn bg-gray-100 hover:bg-gray-200 text-gray-800 p-3 rounded-lg mr-4"><i class="fas fa-minus"></i></button><div class="relative w-32 h-32"><svg class="w-full h-full" viewBox="0 0 100 100"><!-- Background circle --><circle class="text-gray-200" stroke-width="8" stroke="currentColor" fill="transparent" r="40" cx="50" cy="50" /><!-- Progress circle --><circle id="progress-circle" class="text-primary" stroke-width="8" stroke-dasharray="251.2" stroke-dashoffset="125.6" stroke-linecap="round" stroke="currentColor" fill="transparent" r="40" cx="50" cy="50" /></svg><div class="absolute inset-0 flex items-center justify-center"><span id="time-remaining" class="text-2xl font-bold text-primary">24:30</span></div></div><button id="increase-time" class="timer-adjust-btn bg-gray-100 hover:bg-gray-200 text-gray-800 p-3 rounded-lg ml-4"><i class="fas fa-plus"></i></button></div><div class="flex space-x-4 mt-4"><button id="skip-btn" class="bg-white hover:bg-gray-100 text-gray-800 p-3 rounded-lg border border-gray-300 flex items-center justify-center" title="Skip">45 unmodified lines<!-- My Routine Section --><div class="bg-white rounded-xl shadow-md p-6 mb-8"><div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-6"><div class="mb-4 md:mb-0"><h2 class="text-2xl font-bold text-gray-800">My Wellness Routine</h2><div class="flex items-center mt-2"><select id="routine-selector" class="border border-gray-300 rounded-lg px-3 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary">5 unmodified lines<span class="ml-3 text-sm text-gray-600">Total time: <span id="routine-total-time">5</span> min</span></div></div><button id="save-routine" class="bg-primary hover:bg-secondary text-white px-4 py-2 rounded-lg text-sm flex items-center"><i class="fas fa-save mr-2"></i> Save Routine</button></div><div id="routine-container" class="routine-scroll-container">78 unmodified lines</div></div><!-- Activities Library --><div class="bg-white rounded-xl shadow-md p-6 mb-8"><div class="flex flex-col md:flex-row md:items-center md:justify-between mb-6"><h2 class="text-2xl font-bold text-gray-800 mb-4 md:mb-0">Activities</h2><div class="flex flex-col sm:flex-row gap-3"><div class="relative"><input type="text" id="exercise-search" placeholder="Search activities..." class="pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent w-full"><i class="fas fa-search absolute left-3 top-3 text-gray-400"></i></div><select id="exercise-filter" class="px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"><option value="all">All Activities</option><option value="favorites">Favorites</option><option value="stretching">Stretching</option><option value="breathing">Breathing</option>4 unmodified lines</div></div><div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6" id="exercise-container"><!-- Activity Card 1 --><div class="exercise-card bg-light rounded-lg overflow-hidden" data-category="stretching"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-hands-helping text-white text-5xl animate-pulse-slow"></i>11 unmodified lines</div></div><!-- Activity Card 2 --><div class="exercise-card bg-light rounded-lg overflow-hidden" data-category="breathing"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-lungs text-white text-5xl animate-pulse-slow"></i>11 unmodified lines</div></div><!-- Activity Card 3 --><div class="exercise-card bg-light rounded-lg overflow-hidden" data-category="stretching"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-hands text-white text-5xl animate-pulse-slow"></i>11 unmodified lines</div></div><!-- Activity Card 4 --><div class="exercise-card bg-light rounded-lg overflow-hidden hidden-row" data-category="yoga"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-chair text-white text-5xl animate-pulse-slow"></i><button class="favorite-btn absolute top-3 right-3 text-white hover:text-yellow-300 text-xl">10 unmodified lines</div></div><!-- Activity Card 5 --><div class="exercise-card bg-light rounded-lg overflow-hidden hidden-row" data-category="eye"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-eye text-white text-5xl animate-pulse-slow"></i><button class="favorite-btn absolute top-3 right-3 text-white hover:text-yellow-300 text-xl">10 unmodified lines</div></div><!-- Activity Card 6 --><div class="exercise-card bg-light rounded-lg overflow-hidden hidden-row" data-category="hydration"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-water text-white text-5xl animate-pulse-slow"></i><button class="favorite-btn absolute top-3 right-3 text-white hover:text-yellow-300 text-xl">10 unmodified lines</div></div><!-- Activity Card 7 --><div class="exercise-card bg-light rounded-lg overflow-hidden hidden-row" data-category="stretching"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-arrows-alt-h text-white text-5xl animate-pulse-slow"></i><button class="favorite-btn absolute top-3 right-3 text-white hover:text-yellow-300 text-xl">10 unmodified lines</div></div><!-- Activity Card 8 --><div class="exercise-card bg-light rounded-lg overflow-hidden hidden-row" data-category="stretching"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-undo text-white text-5xl animate-pulse-slow"></i><button class="favorite-btn absolute top-3 right-3 text-white hover:text-yellow-300 text-xl">10 unmodified lines</div></div><!-- Activity Card 9 --><div class="exercise-card bg-light rounded-lg overflow-hidden hidden-row" data-category="strength"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-dumbbell text-white text-5xl animate-pulse-slow"></i><button class="favorite-btn absolute top-3 right-3 text-white hover:text-yellow-300 text-xl">10 unmodified lines</div></div><!-- Activity Card 10 --><div class="exercise-card bg-light rounded-lg overflow-hidden hidden-row" data-category="stretching"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-running text-white text-5xl animate-pulse-slow"></i><button class="favorite-btn absolute top-3 right-3 text-white hover:text-yellow-300 text-xl">10 unmodified lines</div></div><!-- Activity Card 11 --><div class="exercise-card bg-light rounded-lg overflow-hidden hidden-row" data-category="stretching"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-hands-praying text-white text-5xl animate-pulse-slow"></i><button class="favorite-btn absolute top-3 right-3 text-white hover:text-yellow-300 text-xl">10 unmodified lines</div></div><!-- Activity Card 12 --><div class="exercise-card bg-light rounded-lg overflow-hidden hidden-row" data-category="breathing"><div class="h-40 bg-primary flex items-center justify-center relative"><i class="fas fa-wind text-white text-5xl animate-pulse-slow"></i><button class="favorite-btn absolute top-3 right-3 text-white hover:text-yellow-300 text-xl">10 unmodified lines</div></div></div><div class="text-center mt-6"><button id="load-more" class="bg-primary hover:bg-secondary text-white px-6 py-2 rounded-lg">Load More Activities</button></div></div></main></div>52 unmodified lines<div class="h-24 bg-primary rounded" style="height: 80%;"></div></div><div class="text-center"><div class="text-xs text-gray-500 mb-1 Wed">Wed</div><div class="h-24 bg-primary rounded" style="height: 45%;"></div></div><div class="text-center">42 unmodified lines</div><div class="bg-light rounded-lg p-4"><h5 class="font-medium text-gray-700 mb-2">Eye Exercises</h5><div class="text-3xl font-bold text-primary mb-2">12</div><div class="text-sm text-gray-500">+4 from last week</div></div></div></div><!-- Achievements --><div><h4 class="text-xl font-semibold text-gray-800 mb-4">Achievements</h4><div class="grid grid-cols-2 sm:grid-cols-3 gap-4"><div class="bg-yellow-50 border border-yellow-100 rounded-lg p-3 text-center"><div class="text-yellow-500 mb-2"><i class="fas fa-trophy text-2xl"></i></div><h5 class="font-medium text-gray-700 mb-1">5-Day Streak</h5><p class="text-xs text-gray-500">Completed all breaks for 5 days</p></div><div class="bg-blue-50 border border-blue-100 rounded-lg p-3 text-center"><div class="text-blue-500 mb-2"><i class="fas fa-check-circle text-2xl"></i></div><h5 class="font-medium text-gray-700 mb-1">Hydration Pro</h5><p class="text-xs text-gray-500">Drank 2L+ for 3 days</p></div><div class="bg-purple-50 border border-purple-100 rounded-lg p-3 text-center"><div class="text-purple-500 mb-2"><i class="fas fa-star text-2xl"></i></div><h5 class="font-medium text-gray-700 mb-1">Stretch Master</h5><p class="text-xs text-gray-500">Completed 20+ stretches</p></div></div></div></div></div></div><!-- Save Routine Modal --><div id="save-routine-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden z-50"><div class="bg-white rounded-xl shadow-2xl w-full max-w-md max-h-[90vh] overflow-y-auto"><div class="p-6 border-b border-gray-200 flex justify-between items-center"><h3 class="text-2xl font-bold text-gray-800">Save Your Routine</h3><button id="close-save-routine" class="text-gray-500 hover:text-gray-700"><i class="fas fa-times text-xl"></i></button></div><div class="p-6"><div class="mb-6"><label class="block text-gray-700 font-medium mb-2">Routine Name</label><input type="text" id="routine-name" placeholder="e.g. Morning Refresh" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"></div><div class="mb-6"><label class="block text-gray-700 font-medium mb-2">Description</label><textarea id="routine-description" placeholder="Brief description of your routine" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent h-24"></textarea></div><div class="mb-6"><h4 class="text-lg font-semibold text-gray-800 mb-3">Routine Summary</h4><div class="bg-light rounded-lg p-4"><div class="flex justify-between items-center mb-3"><span class="font-medium text-gray-700">Total Time:</span><span class="font-bold text-primary">5 minutes</span></div><div class="mb-3"><span class="font-medium text-gray-700">Activities Included:</span><div class="flex flex-wrap gap-2 mt-2"><div class="flex items-center bg-white px-3 py-1 rounded-full text-sm"><div class="activity-icon mr-2"><i class="fas fa-hands-helping text-xs"></i></div>Stretching</div><div class="flex items-center bg-white px-3 py-1 rounded-full text-sm"><div class="activity-icon mr-2"><i class="fas fa-lungs text-xs"></i></div>Breathing</div><div class="flex items-center bg-white px-3 py-1 rounded-full text-sm"><div class="activity-icon mr-2"><i class="fas fa-eye text-xs"></i></div>Eye Care</div></div></div><div><span class="font-medium text-gray-700">Exercises:</span><ul class="list-disc list-inside text-sm text-gray-600 mt-1 pl-2"><li>Neck Stretches (2 min)</li><li>Deep Breathing (1 min)</li><li>Eye Exercises (2 min)</li></ul></div></div></div></div><div class="p-6 border-t border-gray-200 flex justify-end"><button id="confirm-save-routine" class="bg-primary hover:bg-secondary text-white px-6 py-2 rounded-lg font-medium">Save Routine</button></div></div></div><!-- Break Notification --><div id="break-notification" class="fixed bottom-4 right-4 bg-white rounded-xl shadow-2xl p-6 max-w-sm hidden z-50"><div class="flex justify-between items-start mb-4"><h3 class="text-xl font-bold text-gray-800">Time for a Break!</h3><button id="close-notification" class="text-gray-500 hover:text-gray-700"><i class="fas fa-times"></i></button></div><p class="text-gray-600 mb-6">You've been working for 45 minutes. Let's do some neck stretches to relieve tension.</p><div class="flex space-x-3"><button id="snooze-break" class="bg-white hover:bg-gray-100 text-gray-800 px-4 py-2 rounded-lg border border-gray-300">Snooze (5 min)</button><button id="start-break" class="bg-primary hover:bg-secondary text-white px-4 py-2 rounded-lg">Start Break</button></div></div><script>// Auth statelet currentUser = null;let isAuthenticated = false;let isTimerPaused = false;// DOM Elementsconst authModal = document.getElementById('auth-modal');const closeAuth = document.getElementById('close-auth');const loginForm = document.getElementById('login-form');const signupForm = document.getElementById('signup-form');const showSignup = document.getElementById('show-signup');const showLogin = document.getElementById('show-login');const loginBtn = document.getElementById('login-btn');const signupBtn = document.getElementById('signup-btn');const logoutBtn = document.getElementById('logout-btn');const mainContent = document.getElementById('main-content');const profileBtn = document.getElementById('profile-btn');const avatar = document.getElementById('avatar');const usernameDisplay = document.getElementById('username');const settingsBtn = document.getElementById('settings-btn');const settingsModal = document.getElementById('settings-modal');const closeSettings = document.getElementById('close-settings');const saveSettings = document.getElementById('save-settings');const statsBtn = document.getElementById('stats-btn');const statsModal = document.getElementById('stats-modal');const closeStats = document.getElementById('close-stats');const breakNotification = document.getElementById('break-notification');const closeNotification = document.getElementById('close-notification');const snoozeBreak = document.getElementById('snooze-break');const startBreak = document.getElementById('start-break');const takeBreakNow = document.getElementById('take-break-now');const skipBtn = document.getElementById('skip-btn');const pauseBtn = document.getElementById('pause-btn');// Timer adjustment buttonsconst decreaseTimeBtn = document.getElementById('decrease-time');const increaseTimeBtn = document.getElementById('increase-time');// Routine elementsconst routineContainer = document.getElementById('routine-container');const emptyRoutineMessage = document.getElementById('empty-routine-message');const saveRoutineBtn = document.getElementById('save-routine');const routineSelector = document.getElementById('routine-selector');const routineTotalTime = document.getElementById('routine-total-time');// Add to routine modal elementsconst addToRoutineModal = document.getElementById('add-to-routine-modal');const closeAddToRoutine = document.getElementById('close-add-to-routine');const confirmAddToRoutine = document.getElementById('confirm-add-to-routine');const targetRoutine = document.getElementById('target-routine');const exerciseDuration = document.getElementById('exercise-duration');// Save routine modal elementsconst saveRoutineModal = document.getElementById('save-routine-modal');const closeSaveRoutine = document.getElementById('close-save-routine');const confirmSaveRoutine = document.getElementById('confirm-save-routine');// Activities library elementsconst exerciseSearch = document.getElementById('exercise-search');const exerciseFilter = document.getElementById('exercise-filter');const exerciseContainer = document.getElementById('exercise-container');const loadMoreBtn = document.getElementById('load-more');// Timer variableslet workDuration = 45 * 60; // 45 minutes in secondslet breakDuration = 5 * 60; // 5 minutes in secondslet timeLeft = workDuration;let timer;let isWorking = true;// Timer adjustment variableslet decreaseInterval;let increaseInterval;let holdTimeout;let isHolding = false;// Current exercise being added to routinelet currentExerciseToAdd = null;// Sample routines dataconst routines = {morning: {name: "Morning Routine",description: "Start your day with energy and focus",exercises: [{ title: "Neck Stretches", duration: "2 min", icon: "hands-helping" },{ title: "Deep Breathing", duration: "1 min", icon: "lungs" },{ title: "Eye Exercises", duration: "2 min", icon: "eye" }]},afternoon: {name: "Afternoon Routine",description: "Recharge during your midday slump",exercises: [{ title: "Chair Yoga", duration: "3 min", icon: "chair" },{ title: "Wrist & Finger", duration: "2 min", icon: "hands" }]},evening: {name: "Evening Routine",description: "Wind down after work",exercises: [{ title: "Deep Breathing", duration: "2 min", icon: "lungs" },{ title: "Shoulder Rolls", duration: "1 min", icon: "hands-praying" }]},custom: {name: "Custom Routine",description: "Your personalized wellness routine",exercises: []}};// Initialize SortableJS for drag and drop routine itemsnew Sortable(routineContainer, {animation: 150,handle: '.activity-icon',ghostClass: 'dragging',onEnd: function() {updateEmptyRoutineMessage();updateRoutineStats();}});// Show auth modal on page loadwindow.addEventListener('load', () => {authModal.classList.remove('hidden');});// Auth modal handlerscloseAuth.addEventListener('click', () => {if (!isAuthenticated) return; // Don't allow closing if not authenticatedauthModal.classList.add('hidden');});showSignup.addEventListener('click', () => {loginForm.classList.add('hidden');signupForm.classList.remove('hidden');});showLogin.addEventListener('click', () => {signupForm.classList.add('hidden');loginForm.classList.remove('hidden');});loginBtn.addEventListener('click', () => {const email = document.getElementById('login-email').value;const password = document.getElementById('login-password').value;if (!email || !password) {alert('Please enter both email and password');return;}// In a real app, you would validate credentials with a backendcurrentUser = {name: email.split('@')[0],email: email};isAuthenticated = true;// Update UIavatar.textContent = currentUser.name.charAt(0).toUpperCase();usernameDisplay.textContent = currentUser.name;// Hide auth modal and show main contentauthModal.classList.add('hidden');mainContent.classList.remove('hidden');});signupBtn.addEventListener('click', () => {const name = document.getElementById('signup-name').value;const email = document.getElementById('signup-email').value;const password = document.getElementById('signup-password').value;const confirmPassword = document.getElementById('signup-confirm-password').value;if (!name || !email || !password || !confirmPassword) {alert('Please fill in all fields');return;}if (password !== confirmPassword) {alert('Passwords do not match');return;}// In a real app, you would create the account with a backendcurrentUser = {name: name,email: email};isAuthenticated = true;// Update UIavatar.textContent = currentUser.name.charAt(0).toUpperCase();usernameDisplay.textContent = currentUser.name;// Hide auth modal and show main contentauthModal.classList.add('hidden');mainContent.classList.remove('hidden');});logoutBtn.addEventListener('click', () => {isAuthenticated = false;currentUser = null;mainContent.classList.add('hidden');authModal.classList.remove('hidden');});// Modal handlersstatsBtn.addEventListener('click', () => {statsModal.classList.remove('hidden');});closeStats.addEventListener('click', () => {statsModal.classList.add('hidden');});// Routine selector handlerroutineSelector.addEventListener('change', function() {loadRoutine(this.value);});// Save routine handlerssaveRoutineBtn.addEventListener('click', () => {saveRoutineModal.classList.remove('hidden');updateRoutineStats();});closeSaveRoutine.addEventListener('click', () => {saveRoutineModal.classList.add('hidden');});confirmSaveRoutine.addEventListener('click', () => {const routineName = document.getElementById('routine-name').value;const routineDescription = document.getElementById('routine-description').value;if (!routineName) {alert('Please enter a name for your routine');return;}// In a real app, you would save the routine to localStorage or a backendalert(`Routine "${routineName}" saved successfully!`);saveRoutineModal.classList.add('hidden');// Update the routine selectorconst newOption = document.createElement('option');newOption.value = routineName.toLowerCase().replace(/\s+/g, '-');newOption.textContent = routineName;routineSelector.appendChild(newOption);routineSelector.value = newOption.value;});// Add to routine modal handlerscloseAddToRoutine.addEventListener('click', () => {addToRoutineModal.classList.add('hidden');currentExerciseToAdd = null;});confirmAddToRoutine.addEventListener('click', () => {if (!currentExerciseToAdd) return;const duration = exerciseDuration.value || '2';const routineId = targetRoutine.value;// Add to the selected routineconst exerciseCard = currentExerciseToAdd.closest('.exercise-card');const title = exerciseCard.querySelector('h3').textContent;const icon = exerciseCard.querySelector('.fa-3x').classList[1].replace('fa-', '');// In a real app, you would add to the routine data structureaddToRoutine(title, duration + ' min', icon);addToRoutineModal.classList.add('hidden');currentExerciseToAdd = null;});// Notification handlerscloseNotification.addEventListener('click', () => {breakNotification.classList.add('hidden');});snoozeBreak.addEventListener('click', () => {breakNotification.classList.add('hidden');// Snooze for 5 minutestimeLeft = 5 * 60;startTimer();});startBreak.addEventListener('click', () => {breakNotification.classList.add('hidden');isWorking = false;timeLeft = breakDuration;updateActivityDisplay("Take a Break", "Time to stretch and relax!");startTimer();});// Dashboard button handlerstakeBreakNow.addEventListener('click', () => {isWorking = false;timeLeft = breakDuration;updateActivityDisplay("Take a Break", "Time to stretch and relax!");startTimer();});skipBtn.addEventListener('click', () => {isWorking = true;timeLeft = workDuration;updateActivityDisplay("Focus Time", "You're currently working. Your next break is scheduled soon.");startTimer();});pauseBtn.addEventListener('click', () => {if (isTimerPaused) {// Resume timerisTimerPaused = false;pauseBtn.innerHTML = '<i class="fas fa-pause"></i>';pauseBtn.title = "Pause";startTimer();} else {// Pause timerisTimerPaused = true;clearInterval(timer);pauseBtn.innerHTML = '<i class="fas fa-play"></i>';pauseBtn.title = "Resume";}});// Timer adjustment handlersdecreaseTimeBtn.addEventListener('mousedown', startDecreasingTime);decreaseTimeBtn.addEventListener('touchstart', startDecreasingTime);decreaseTimeBtn.addEventListener('mouseup', stopAdjustingTime);decreaseTimeBtn.addEventListener('mouseleave', stopAdjustingTime);decreaseTimeBtn.addEventListener('touchend', stopAdjustingTime);increaseTimeBtn.addEventListener('mousedown', startIncreasingTime);increaseTimeBtn.addEventListener('touchstart', startIncreasingTime);increaseTimeBtn.addEventListener('mouseup', stopAdjustingTime);increaseTimeBtn.addEventListener('mouseleave', stopAdjustingTime);increaseTimeBtn.addEventListener('touchend', stopAdjustingTime);function startDecreasingTime() {adjustTime(-1);holdTimeout = setTimeout(() => {isHolding = true;decreaseInterval = setInterval(() => {adjustTime(-5); // Faster decrease after holding for 2 seconds}, 100);}, 2000);}function startIncreasingTime() {adjustTime(1);holdTimeout = setTimeout(() => {isHolding = true;increaseInterval = setInterval(() => {adjustTime(5); // Faster increase after holding for 2 seconds}, 100);}, 2000);}function stopAdjustingTime() {clearTimeout(holdTimeout);clearInterval(decreaseInterval);clearInterval(increaseInterval);isHolding = false;}function adjustTime(seconds) {timeLeft = Math.max(0, timeLeft + seconds);updateTimerDisplay();}// Load more activities handlerloadMoreBtn.addEventListener('click', () => {const hiddenCards = document.querySelectorAll('.exercise-card.hidden-row');const cardsToShow = Math.min(3, hiddenCards.length);for (let i = 0; i < cardsToShow; i++) {hiddenCards[i].classList.remove('hidden-row');}// Hide button if no more cards to showif (hiddenCards.length <= 3) {loadMoreBtn.classList.add('hidden');}});// Add event listeners to all "Add to Routine" buttonsdocument.querySelectorAll('.add-to-routine').forEach(button => {button.addEventListener('click', function() {currentExerciseToAdd = this;addToRoutineModal.classList.remove('hidden');// Set default duration based on exerciseconst durationText = this.closest('.exercise-card').querySelector('.text-sm.text-gray-500').textContent;const defaultDuration = durationText.includes('min') ? durationText.split(' ')[0] : '2';exerciseDuration.value = defaultDuration;});});// Add event listeners to all favorite buttonsdocument.querySelectorAll('.favorite-btn').forEach(button => {button.addEventListener('click', function() {this.classList.toggle('active');const icon = this.querySelector('i');if (icon.classList.contains('far')) {icon.classList.remove('far');icon.classList.add('fas');} else {icon.classList.remove('fas');icon.classList.add('far');}// In a real app, you would save the favorite status});});// Add event listeners to all remove buttons in routine itemsroutineContainer.addEventListener('click', function(e) {if (e.target.closest('.routine-item') && e.target.closest('.fa-times')) {e.target.closest('.routine-item').remove();updateEmptyRoutineMessage();updateRoutineStats();}});function loadRoutine(routineId) {routineContainer.innerHTML = '';const routine = routines[routineId];if (!routine) return;routine.exercises.forEach(exercise => {addToRoutine(exercise.title, exercise.duration, exercise.icon);});updateEmptyRoutineMessage();updateRoutineStats();}function addToRoutine(title, duration, icon) {emptyRoutineMessage.classList.add('hidden');const routineItem = document.createElement('div');routineItem.className = 'routine-item bg-light rounded-lg p-3 flex flex-col border border-gray-200';routineItem.innerHTML = `<div class="flex items-center justify-between mb-2"><div class="activity-icon"><i class="fas fa-${icon} text-xs"></i></div><button class="text-gray-400 hover:text-red-500 text-sm"><i class="fas fa-times"></i></button></div><h3 class="font-semibold text-gray-800 text-sm mb-1">${title}</h3><p class="text-xs text-gray-500">${duration}</p>`;routineContainer.appendChild(routineItem);updateRoutineStats();}function updateEmptyRoutineMessage() {if (routineContainer.children.length === 0) {emptyRoutineMessage.classList.remove('hidden');} else {emptyRoutineMessage.classList.add('hidden');}}function updateRoutineStats() {let totalTime = 0;const exercises = [];const activityTypes = new Set();document.querySelectorAll('.routine-item').forEach(item => {const durationText = item.querySelector('.text-xs.text-gray-500').textContent;const duration = parseInt(durationText) || 0;totalTime += duration;const title = item.querySelector('h3').textContent;exercises.push(title + ' (' + durationText + ')');const iconClass = item.querySelector('.activity-icon i').classList[1];if (iconClass.includes('hands')) activityTypes.add('Stretching');if (iconClass.includes('lungs')) activityTypes.add('Breathing');if (iconClass.includes('eye')) activityTypes.add('Eye Care');if (iconClass.includes('chair')) activityTypes.add('Yoga');if (iconClass.includes('water')) activityTypes.add('Hydration');});// Update the total time displayroutineTotalTime.textContent = totalTime;// Update the summary in the save modalif (saveRoutineModal) {const totalTimeElement = saveRoutineModal.querySelector('.bg-light .font-bold.text-primary');if (totalTimeElement) {totalTimeElement.textContent = totalTime + ' minutes';}const activitiesContainer = saveRoutineModal.querySelector('.flex-wrap.gap-2');if (activitiesContainer) {activitiesContainer.innerHTML = '';activityTypes.forEach(type => {let icon = 'spa';if (type === 'Stretching') icon = 'hands-helping';if (type === 'Breathing') icon = 'lungs';if (type === 'Eye Care') icon = 'eye';if (type === 'Yoga') icon = 'chair';if (type === 'Hydration') icon = 'water';const activityPill = document.createElement('div');activityPill.className = 'flex items-center bg-white px-3 py-1 rounded-full text-sm';activityPill.innerHTML = `<div class="activity-icon mr-2"><i class="fas fa-${icon} text-xs"></i></div>${type}`;activitiesContainer.appendChild(activityPill);});}const exercisesList = saveRoutineModal.querySelector('.list-disc');if (exercisesList) {exercisesList.innerHTML = exercises.map(ex => `<li>${ex}</li>`).join('');}}}// Activities library search and filterexerciseSearch.addEventListener('input', filterExercises);exerciseFilter.addEventListener('change', filterExercises);function filterExercises() {const searchTerm = exerciseSearch.value.toLowerCase();const filterValue = exerciseFilter.value;document.querySelectorAll('.exercise-card').forEach(card => {const title = card.querySelector('h3').textContent.toLowerCase();const description = card.querySelector('p').textContent.toLowerCase();const category = card.dataset.category;const isFavorite = card.querySelector('.favorite-btn').classList.contains('active');const matchesSearch = title.includes(searchTerm) || description.includes(searchTerm);const matchesFilter = filterValue === 'all' ||(filterValue === 'favorites' && isFavorite) ||(filterValue !== 'favorites' && category === filterValue);if (matchesSearch && matchesFilter) {card.style.display = 'block';} else {card.style.display = 'none';}});}// Timer functionsfunction startTimer() {if (isTimerPaused) return;clearInterval(timer);timer = setInterval(updateTimer, 1000);}function updateTimer() {if (isTimerPaused) return;timeLeft--;if (timeLeft <= 0) {clearInterval(timer);if (isWorking) {// Time for a breakbreakNotification.classList.remove('hidden');} else {// Break is over, back to workisWorking = true;timeLeft = workDuration;updateActivityDisplay("Focus Time", "You're currently working. Your next break is scheduled soon.");startTimer();}}updateTimerDisplay();}function updateTimerDisplay() {const minutes = Math.floor(timeLeft / 60);const seconds = timeLeft % 60;document.getElementById('time-remaining').textContent =`${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;// Update progress circleconst totalTime = isWorking ? workDuration : breakDuration;const progress = (totalTime - timeLeft) / totalTime;const circumference = 251.2; // 2 * π * r (where r=40)const offset = circumference - (progress * circumference);document.getElementById('progress-circle').style.strokeDashoffset = offset;}function updateActivityDisplay(nextActivity, currentActivity) {document.getElementById('next-activity').textContent = `Next: ${nextActivity}`;document.getElementById('current-activity').innerHTML = `<p class="text-gray-600">${currentActivity}</p>`;}// InitializeupdateActivityDisplay("Stretch", "You're currently working. Your next break is scheduled soon.");startTimer();updateEmptyRoutineMessage();loadRoutine('morning');// Set one exercise as favorite by default for demodocument.querySelector('.exercise-card[data-category="eye"] .favorite-btn').classList.add('active');</script><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=tframe/deskrefresh" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>
123I want this same site, but I want it to use an attractive green color that represents nurture or nutrition. Can you also add a routine section just after the Current Activity section and above the Exercise Library section? I want the tiles to be movable too so the routine order can be changed. Also, I want the ability for users to favorite an exercise and so the exercise library should also have a search and filtering option.This is great! For the title, I want the website to be named Desk Refresh. For the My Wellness Routine, I want the routine to be a more Horizontal scrollable list with miniature cards. Also, after the user clicks Save Routine, I want a popup to come up so they can add info for saving such as routine title, description, and site provides stats like time to complete, and a list of icons that show type of activities included in routine like drink, eat, breathe, exercise, meditate. After that's done, can the user have option to select between different routines?This is fantastic! I think it's missing. when the user selects "Add to Routine", I want it show a popup or menu so the user can then add it to a routine. It should update and get added to the My Wellness Routine. Also, I want to update the Current Activity section. I like the timer that's there, but I want the text to be above the circle instead of inside it. And the circle can be a bit smaller to give it space. Also, I think a Pause/Resume button would be good to add. For these button in the Current Activity, can we use icons instead of text? Last thing that is missing is ability to have authentication and login workflow. So, I would like to have a profile setting and there should be an avatar at the top, instead of Settings. Can you implement so users have to create or log into an account? Also, for the different exercises, I want more specific ones. Use the follow as examples, but are not limited to: push ups, side stretches, neck rotation stretches, etc. I want a lot of options for the users.12This is great. I want to add a Plus and Minus button to the right and left of the circle timer. The button should reduce the current timer by 1 second. Holding the buttons down should also reduce the time, but after holding for longer than 2 seconds, it should start reducing the time faster. In the My Wellness Routine, I want the "Save Routine" button to have a save icon and be more in the top right corner so it is more Mobile friendly. For the Exercise Library, display only 3 rows initially. Then I also want a Load More button beneath it that will load more activities. Also, change the name from Exercise Library to Activities. Lastly, When selecting the Add to Routine button on the activity card, it displays a popup. The popup is perfect, but when I select the "Add to Routine" button, it should then close the popup and add the activity to the selected routine.This is great. I want to add a Plus and Minus button to the right and left of the circle timer. The button should reduce the current timer by 1 second. Holding the buttons down should also reduce the time, but after holding for longer than 2 seconds, it should start reducing the time faster. In the My Wellness Routine, I want the "Save Routine" button to have a save icon and be more in the top right corner so it is more Mobile friendly. For the Exercise Library, display only 3 rows initially. Then I also want a Load More button beneath it that will load more activities. Also, change the name from Exercise Library to Activities. Lastly, When selecting the Add to Routine button on the activity card, it displays a popup. The popup is perfect, but when I select the "Add to Routine" button, it should then close the popup and add the activity to the selected routine.
index.html+796-701
prompts.txt+2-3