Créer une application mobile complète et responsive sous React Native + TypeScript + Supabase, centrée sur la progression en pompes avec détection automatique et avatar évolutif. Détails : Interface moderne, motivante et intuitive avec palette de couleurs dynamiques à définir. Animations fluides pour un avatar évolutif qui reflète la régularité et les efforts de l’utilisateur. Profils utilisateurs personnalisés, avec stockage fiable des données (nombre de pompes, fréquence, niveaux) dans Supabase. Détection automatique des pompes via les capteurs du téléphone (accéléromètre, gyroscope) ou caméra, avec possibilité de poser le téléphone au sol pour détection tactile ou pression. Comptage précis et en temps réel, avec feedback motivant. Système de récompenses lié à l’évolution de l’avatar et notifications pour encourager la régularité. Interface engageante et facile à utiliser, avec possibilité d’intégrer défis et challenges sociaux entre utilisateurs. Authentification sécurisée utilisateurs via Supabase, gestion complète des profils et suivi progressif. Nom de l’application : PumpMaster Générer tout le code frontend nécessaire (JSX, CSS-in-JS, composants React Native) ainsi que la structure backend de base avec Supabase, en mettant l’accent sur une expérience utilisateur fluide, performante et gamifiée. - Initial Deployment
9ff5734 verified Download index.html from ALXVKE/ok: direct link, hf CLI and curl.
- Browser
- Download file 28.8 kB
-
https://huggingface.co/spaces/ALXVKE/ok/resolve/main/index.html
- Command line
-
hf download hf://spaces/ALXVKE/ok/index.html
-
curl -L -o index.html https://huggingface.co/spaces/ALXVKE/ok/resolve/main/index.html
28.8 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>PumpMaster - Pushup Progress Tracker</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| @keyframes pulse { | |
| 0% { transform: scale(1); } | |
| 50% { transform: scale(1.05); } | |
| 100% { transform: scale(1); } | |
| } | |
| @keyframes bounce { | |
| 0%, 100% { transform: translateY(0); } | |
| 50% { transform: translateY(-10px); } | |
| } | |
| .pulse-animation { | |
| animation: pulse 2s infinite; | |
| } | |
| .bounce-animation { | |
| animation: bounce 1s infinite; | |
| } | |
| .progress-ring__circle { | |
| transition: stroke-dashoffset 0.35s; | |
| transform: rotate(-90deg); | |
| transform-origin: 50% 50%; | |
| } | |
| .floating-button { | |
| box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); | |
| } | |
| .avatar-container { | |
| perspective: 1000px; | |
| } | |
| .avatar { | |
| transition: transform 0.5s; | |
| } | |
| .avatar:hover { | |
| transform: rotateY(20deg); | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-100 font-sans"> | |
| <!-- Auth Screen --> | |
| <div id="auth-screen" class="fixed inset-0 bg-gradient-to-br from-blue-600 to-purple-700 flex flex-col items-center justify-center p-6 z-50 transition-opacity duration-500"> | |
| <div class="bg-white rounded-2xl p-8 w-full max-w-md shadow-2xl"> | |
| <div class="text-center mb-8"> | |
| <h1 class="text-3xl font-bold text-gray-800 mb-2">PumpMaster</h1> | |
| <p class="text-gray-600">Transform your pushup routine into a game</p> | |
| </div> | |
| <div class="space-y-4"> | |
| <div class="relative"> | |
| <input type="email" id="login-email" placeholder="Email" class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500"> | |
| <i class="fas fa-envelope absolute right-3 top-3 text-gray-400"></i> | |
| </div> | |
| <div class="relative"> | |
| <input type="password" id="login-password" placeholder="Password" class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500"> | |
| <i class="fas fa-lock absolute right-3 top-3 text-gray-400"></i> | |
| </div> | |
| <button id="login-btn" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded-lg transition duration-200"> | |
| Sign In | |
| </button> | |
| <div class="text-center text-sm text-gray-600 mt-4"> | |
| Don't have an account? <button id="show-signup" class="text-blue-600 font-medium">Sign Up</button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Signup Screen (hidden initially) --> | |
| <div id="signup-screen" class="fixed inset-0 bg-gradient-to-br from-blue-600 to-purple-700 flex flex-col items-center justify-center p-6 z-50 hidden opacity-0 transition-opacity duration-500"> | |
| <div class="bg-white rounded-2xl p-8 w-full max-w-md shadow-2xl"> | |
| <div class="text-center mb-8"> | |
| <h1 class="text-3xl font-bold text-gray-800 mb-2">Create Account</h1> | |
| <p class="text-gray-600">Start your pushup journey today</p> | |
| </div> | |
| <div class="space-y-4"> | |
| <div class="relative"> | |
| <input type="text" id="signup-name" placeholder="Full Name" class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500"> | |
| <i class="fas fa-user absolute right-3 top-3 text-gray-400"></i> | |
| </div> | |
| <div class="relative"> | |
| <input type="email" id="signup-email" placeholder="Email" class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500"> | |
| <i class="fas fa-envelope absolute right-3 top-3 text-gray-400"></i> | |
| </div> | |
| <div class="relative"> | |
| <input type="password" id="signup-password" placeholder="Password" class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500"> | |
| <i class="fas fa-lock absolute right-3 top-3 text-gray-400"></i> | |
| </div> | |
| <div class="relative"> | |
| <input type="password" id="signup-confirm" placeholder="Confirm Password" class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500"> | |
| <i class="fas fa-lock absolute right-3 top-3 text-gray-400"></i> | |
| </div> | |
| <button id="signup-btn" class="w-full bg-purple-600 hover:bg-purple-700 text-white font-bold py-3 px-4 rounded-lg transition duration-200"> | |
| Create Account | |
| </button> | |
| <div class="text-center text-sm text-gray-600 mt-4"> | |
| Already have an account? <button id="show-login" class="text-blue-600 font-medium">Sign In</button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Main App Container --> | |
| <div id="app-container" class="max-w-md mx-auto bg-white min-h-screen shadow-xl overflow-hidden hidden"> | |
| <!-- Header --> | |
| <header class="bg-gradient-to-r from-blue-600 to-purple-600 text-white p-4"> | |
| <div class="flex justify-between items-center"> | |
| <div class="flex items-center space-x-2"> | |
| <div class="w-10 h-10 rounded-full bg-white flex items-center justify-center"> | |
| <i class="fas fa-fire text-purple-600 text-xl"></i> | |
| </div> | |
| <h1 class="text-xl font-bold">PumpMaster</h1> | |
| </div> | |
| <button id="profile-btn" class="w-10 h-10 rounded-full bg-white bg-opacity-20 flex items-center justify-center"> | |
| <i class="fas fa-user text-white"></i> | |
| </button> | |
| </div> | |
| </header> | |
| <!-- Main Content --> | |
| <main class="p-4"> | |
| <!-- Stats Overview --> | |
| <div class="bg-gradient-to-r from-blue-50 to-purple-50 rounded-xl p-4 mb-6 shadow"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h2 class="text-lg font-semibold text-gray-800">Today's Progress</h2> | |
| <div class="text-sm text-gray-600">Day 7 streak <i class="fas fa-bolt text-yellow-500 ml-1"></i></div> | |
| </div> | |
| <div class="grid grid-cols-3 gap-4 text-center"> | |
| <div class="bg-white rounded-lg p-3 shadow"> | |
| <div class="text-2xl font-bold text-blue-600" id="today-count">0</div> | |
| <div class="text-xs text-gray-500">Today</div> | |
| </div> | |
| <div class="bg-white rounded-lg p-3 shadow"> | |
| <div class="text-2xl font-bold text-purple-600" id="week-count">0</div> | |
| <div class="text-xs text-gray-500">This Week</div> | |
| </div> | |
| <div class="bg-white rounded-lg p-3 shadow"> | |
| <div class="text-2xl font-bold text-green-600" id="total-count">0</div> | |
| <div class="text-xs text-gray-500">Total</div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Avatar Section --> | |
| <div class="mb-6"> | |
| <div class="flex justify-between items-center mb-3"> | |
| <h2 class="text-lg font-semibold text-gray-800">Your Avatar</h2> | |
| <div class="text-sm text-blue-600">Level 3 <i class="fas fa-arrow-up text-green-500 ml-1"></i></div> | |
| </div> | |
| <div class="avatar-container bg-gradient-to-br from-blue-100 to-purple-100 rounded-xl p-6 flex flex-col items-center shadow"> | |
| <div class="relative mb-4"> | |
| <svg class="w-32 h-32"> | |
| <circle cx="64" cy="64" r="60" class="fill-white stroke-gray-200 stroke-2" /> | |
| <!-- Avatar will be drawn here --> | |
| <image id="avatar-image" href="https://cdn-icons-png.flaticon.com/512/3135/3135715.png" x="14" y="14" width="100" height="100" /> | |
| </svg> | |
| <div class="absolute -bottom-2 -right-2 bg-yellow-400 text-white rounded-full w-10 h-10 flex items-center justify-center shadow-lg"> | |
| <span class="font-bold">3</span> | |
| </div> | |
| </div> | |
| <div class="w-full bg-gray-200 rounded-full h-2.5 mb-2"> | |
| <div class="bg-blue-600 h-2.5 rounded-full" style="width: 45%"></div> | |
| </div> | |
| <p class="text-sm text-gray-600">45% to next level</p> | |
| </div> | |
| </div> | |
| <!-- Workout Section --> | |
| <div class="mb-6"> | |
| <h2 class="text-lg font-semibold text-gray-800 mb-3">Start Workout</h2> | |
| <div class="bg-white rounded-xl p-4 shadow"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <div> | |
| <h3 class="font-medium">Pushup Challenge</h3> | |
| <p class="text-sm text-gray-500">Complete 20 pushups</p> | |
| </div> | |
| <div class="relative w-16 h-16"> | |
| <svg class="w-full h-full"> | |
| <circle cx="32" cy="32" r="30" class="fill-none stroke-gray-200 stroke-2" /> | |
| <circle cx="32" cy="32" r="30" class="progress-ring__circle fill-none stroke-blue-600 stroke-2" stroke-dasharray="188.5" stroke-dashoffset="113.1" /> | |
| </svg> | |
| <div class="absolute inset-0 flex items-center justify-center"> | |
| <span class="font-bold text-blue-600">12/20</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="flex space-x-3"> | |
| <button id="start-workout" class="flex-1 bg-blue-600 hover:bg-blue-700 text-white font-medium py-3 px-4 rounded-lg transition duration-200 flex items-center justify-center"> | |
| <i class="fas fa-play mr-2"></i> Start | |
| </button> | |
| <button class="bg-gray-100 hover:bg-gray-200 text-gray-800 font-medium py-3 px-4 rounded-lg transition duration-200"> | |
| <i class="fas fa-cog"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Recent Activity --> | |
| <div> | |
| <h2 class="text-lg font-semibold text-gray-800 mb-3">Recent Activity</h2> | |
| <div class="space-y-3"> | |
| <div class="bg-white rounded-lg p-3 shadow flex items-center"> | |
| <div class="bg-green-100 text-green-800 rounded-full w-10 h-10 flex items-center justify-center mr-3"> | |
| <i class="fas fa-trophy"></i> | |
| </div> | |
| <div> | |
| <h3 class="font-medium">New Personal Record!</h3> | |
| <p class="text-sm text-gray-500">25 pushups - Yesterday</p> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-lg p-3 shadow flex items-center"> | |
| <div class="bg-blue-100 text-blue-800 rounded-full w-10 h-10 flex items-center justify-center mr-3"> | |
| <i class="fas fa-fire"></i> | |
| </div> | |
| <div> | |
| <h3 class="font-medium">7 Day Streak</h3> | |
| <p class="text-sm text-gray-500">Keep it going!</p> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-lg p-3 shadow flex items-center"> | |
| <div class="bg-purple-100 text-purple-800 rounded-full w-10 h-10 flex items-center justify-center mr-3"> | |
| <i class="fas fa-level-up-alt"></i> | |
| </div> | |
| <div> | |
| <h3 class="font-medium">Level Up!</h3> | |
| <p class="text-sm text-gray-500">Reached Level 3 - 2 days ago</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| <!-- Bottom Navigation --> | |
| <nav class="bg-white border-t border-gray-200 fixed bottom-0 w-full max-w-md flex justify-around py-2"> | |
| <button class="p-2 text-blue-600"> | |
| <i class="fas fa-home text-xl"></i> | |
| </button> | |
| <button class="p-2 text-gray-500"> | |
| <i class="fas fa-chart-line text-xl"></i> | |
| </button> | |
| <button class="p-2 text-gray-500"> | |
| <i class="fas fa-trophy text-xl"></i> | |
| </button> | |
| <button class="p-2 text-gray-500"> | |
| <i class="fas fa-users text-xl"></i> | |
| </button> | |
| </nav> | |
| <!-- Workout Modal --> | |
| <div id="workout-modal" class="fixed inset-0 bg-black bg-opacity-70 flex flex-col items-center justify-center z-50 hidden"> | |
| <div class="bg-white rounded-t-3xl w-full max-w-md h-3/4 overflow-hidden relative"> | |
| <div class="absolute top-4 right-4 z-10"> | |
| <button id="close-workout" class="bg-gray-200 hover:bg-gray-300 text-gray-800 rounded-full w-10 h-10 flex items-center justify-center"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <div class="h-full flex flex-col"> | |
| <div class="bg-gradient-to-r from-blue-600 to-purple-600 p-6 text-white text-center"> | |
| <h2 class="text-2xl font-bold mb-1">Pushup Challenge</h2> | |
| <p>Complete 20 pushups</p> | |
| </div> | |
| <div class="flex-1 flex flex-col items-center justify-center p-6"> | |
| <div class="relative mb-8"> | |
| <div class="w-48 h-48 rounded-full bg-blue-100 flex items-center justify-center mb-4 shadow-lg"> | |
| <div class="text-5xl font-bold text-blue-600" id="pushup-count">0</div> | |
| </div> | |
| <div class="absolute -bottom-2 -right-2 bg-yellow-400 text-white rounded-full w-12 h-12 flex items-center justify-center shadow-lg"> | |
| <span class="font-bold">+5</span> | |
| </div> | |
| </div> | |
| <div class="text-center mb-8"> | |
| <p class="text-gray-600 mb-2">Place your phone on the floor and start pushing!</p> | |
| <div class="flex justify-center space-x-2"> | |
| <div class="w-3 h-3 rounded-full bg-blue-400"></div> | |
| <div class="w-3 h-3 rounded-full bg-blue-400"></div> | |
| <div class="w-3 h-3 rounded-full bg-blue-400"></div> | |
| </div> | |
| </div> | |
| <button id="detect-pushup" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-4 px-8 rounded-full text-lg floating-button"> | |
| <i class="fas fa-hand-paper mr-2"></i> Start Detection | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Profile Modal --> | |
| <div id="profile-modal" class="fixed inset-0 bg-black bg-opacity-70 flex flex-col items-center justify-center z-50 hidden"> | |
| <div class="bg-white rounded-t-3xl w-full max-w-md h-3/4 overflow-hidden relative"> | |
| <div class="absolute top-4 right-4 z-10"> | |
| <button id="close-profile" class="bg-gray-200 hover:bg-gray-300 text-gray-800 rounded-full w-10 h-10 flex items-center justify-center"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <div class="h-full overflow-y-auto"> | |
| <div class="bg-gradient-to-r from-blue-600 to-purple-600 p-6 text-white"> | |
| <div class="flex items-center"> | |
| <div class="w-16 h-16 rounded-full bg-white flex items-center justify-center mr-4"> | |
| <i class="fas fa-user text-purple-600 text-2xl"></i> | |
| </div> | |
| <div> | |
| <h2 class="text-xl font-bold" id="profile-name">User Name</h2> | |
| <p class="text-blue-100">Level 3 Trainer</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="p-6"> | |
| <h3 class="text-lg font-semibold text-gray-800 mb-4">Your Stats</h3> | |
| <div class="grid grid-cols-2 gap-4 mb-6"> | |
| <div class="bg-blue-50 rounded-lg p-3"> | |
| <div class="text-2xl font-bold text-blue-600">1,245</div> | |
| <div class="text-sm text-gray-600">Total Pushups</div> | |
| </div> | |
| <div class="bg-purple-50 rounded-lg p-3"> | |
| <div class="text-2xl font-bold text-purple-600">7</div> | |
| <div class="text-sm text-gray-600">Day Streak</div> | |
| </div> | |
| <div class="bg-green-50 rounded-lg p-3"> | |
| <div class="text-2xl font-bold text-green-600">3</div> | |
| <div class="text-sm text-gray-600">Level</div> | |
| </div> | |
| <div class="bg-yellow-50 rounded-lg p-3"> | |
| <div class="text-2xl font-bold text-yellow-600">12</div> | |
| <div class="text-sm text-gray-600">Badges</div> | |
| </div> | |
| </div> | |
| <div class="mb-6"> | |
| <h3 class="text-lg font-semibold text-gray-800 mb-3">Achievements</h3> | |
| <div class="flex flex-wrap gap-3"> | |
| <div class="bg-white rounded-full p-2 shadow border border-yellow-300"> | |
| <div class="w-10 h-10 bg-yellow-100 rounded-full flex items-center justify-center text-yellow-600"> | |
| <i class="fas fa-medal"></i> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-full p-2 shadow border border-blue-300"> | |
| <div class="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center text-blue-600"> | |
| <i class="fas fa-fire"></i> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-full p-2 shadow border border-green-300"> | |
| <div class="w-10 h-10 bg-green-100 rounded-full flex items-center justify-center text-green-600"> | |
| <i class="fas fa-star"></i> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-full p-2 shadow border border-purple-300"> | |
| <div class="w-10 h-10 bg-purple-100 rounded-full flex items-center justify-center text-purple-600"> | |
| <i class="fas fa-bolt"></i> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-full p-2 shadow border border-gray-300 opacity-50"> | |
| <div class="w-10 h-10 bg-gray-100 rounded-full flex items-center justify-center text-gray-400"> | |
| <i class="fas fa-lock"></i> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <button id="logout-btn" class="w-full bg-red-50 hover:bg-red-100 text-red-600 font-medium py-3 px-4 rounded-lg transition duration-200 border border-red-200 flex items-center justify-center"> | |
| <i class="fas fa-sign-out-alt mr-2"></i> Sign Out | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| // DOM Elements | |
| const authScreen = document.getElementById('auth-screen'); | |
| const signupScreen = document.getElementById('signup-screen'); | |
| const appContainer = document.getElementById('app-container'); | |
| 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 profileBtn = document.getElementById('profile-btn'); | |
| const startWorkout = document.getElementById('start-workout'); | |
| const workoutModal = document.getElementById('workout-modal'); | |
| const closeWorkout = document.getElementById('close-workout'); | |
| const detectPushup = document.getElementById('detect-pushup'); | |
| const profileModal = document.getElementById('profile-modal'); | |
| const closeProfile = document.getElementById('close-profile'); | |
| const logoutBtn = document.getElementById('logout-btn'); | |
| const pushupCount = document.getElementById('pushup-count'); | |
| const todayCount = document.getElementById('today-count'); | |
| const weekCount = document.getElementById('week-count'); | |
| const totalCount = document.getElementById('total-count'); | |
| const profileName = document.getElementById('profile-name'); | |
| // State | |
| let count = 0; | |
| let todayTotal = 0; | |
| let weekTotal = 35; | |
| let allTimeTotal = 1245; | |
| let detectionInterval; | |
| // Event Listeners | |
| showSignup.addEventListener('click', () => { | |
| authScreen.classList.add('hidden', 'opacity-0'); | |
| signupScreen.classList.remove('hidden'); | |
| setTimeout(() => signupScreen.classList.remove('opacity-0'), 10); | |
| }); | |
| showLogin.addEventListener('click', () => { | |
| signupScreen.classList.add('hidden', 'opacity-0'); | |
| authScreen.classList.remove('hidden'); | |
| setTimeout(() => authScreen.classList.remove('opacity-0'), 10); | |
| }); | |
| loginBtn.addEventListener('click', () => { | |
| const email = document.getElementById('login-email').value; | |
| if (email) { | |
| authScreen.classList.add('hidden'); | |
| appContainer.classList.remove('hidden'); | |
| profileName.textContent = email.split('@')[0]; | |
| } | |
| }); | |
| signupBtn.addEventListener('click', () => { | |
| const name = document.getElementById('signup-name').value; | |
| const email = document.getElementById('signup-email').value; | |
| if (email && name) { | |
| signupScreen.classList.add('hidden'); | |
| appContainer.classList.remove('hidden'); | |
| profileName.textContent = name; | |
| } | |
| }); | |
| profileBtn.addEventListener('click', () => { | |
| profileModal.classList.remove('hidden'); | |
| }); | |
| closeProfile.addEventListener('click', () => { | |
| profileModal.classList.add('hidden'); | |
| }); | |
| startWorkout.addEventListener('click', () => { | |
| workoutModal.classList.remove('hidden'); | |
| }); | |
| closeWorkout.addEventListener('click', () => { | |
| workoutModal.classList.add('hidden'); | |
| stopDetection(); | |
| }); | |
| detectPushup.addEventListener('click', () => { | |
| if (detectPushup.textContent.includes('Start')) { | |
| startDetection(); | |
| detectPushup.innerHTML = '<i class="fas fa-stop mr-2"></i> Stop Detection'; | |
| detectPushup.classList.remove('bg-blue-600'); | |
| detectPushup.classList.add('bg-red-500', 'hover:bg-red-600'); | |
| } else { | |
| stopDetection(); | |
| detectPushup.innerHTML = '<i class="fas fa-hand-paper mr-2"></i> Start Detection'; | |
| detectPushup.classList.remove('bg-red-500', 'hover:bg-red-600'); | |
| detectPushup.classList.add('bg-blue-600'); | |
| } | |
| }); | |
| logoutBtn.addEventListener('click', () => { | |
| profileModal.classList.add('hidden'); | |
| appContainer.classList.add('hidden'); | |
| authScreen.classList.remove('hidden'); | |
| setTimeout(() => authScreen.classList.remove('opacity-0'), 10); | |
| }); | |
| // Functions | |
| function startDetection() { | |
| count = 0; | |
| pushupCount.textContent = count; | |
| // Simulate pushup detection | |
| detectionInterval = setInterval(() => { | |
| count++; | |
| pushupCount.textContent = count; | |
| // Random chance to get a "perfect" pushup bonus | |
| if (Math.random() > 0.7) { | |
| pushupCount.classList.add('pulse-animation'); | |
| setTimeout(() => pushupCount.classList.remove('pulse-animation'), 1000); | |
| } | |
| // Update totals | |
| todayTotal++; | |
| weekTotal++; | |
| allTimeTotal++; | |
| todayCount.textContent = todayTotal; | |
| weekCount.textContent = weekTotal; | |
| totalCount.textContent = allTimeTotal; | |
| // Random avatar evolution | |
| if (count % 5 === 0) { | |
| document.getElementById('avatar-image').classList.add('bounce-animation'); | |
| setTimeout(() => { | |
| document.getElementById('avatar-image').classList.remove('bounce-animation'); | |
| }, 1000); | |
| } | |
| }, 1500 + Math.random() * 1000); // Random interval to simulate real pushups | |
| } | |
| function stopDetection() { | |
| clearInterval(detectionInterval); | |
| } | |
| // Initialize with some data | |
| todayCount.textContent = todayTotal; | |
| weekCount.textContent = weekTotal; | |
| totalCount.textContent = allTimeTotal; | |
| </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=ALXVKE/ok" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |