Spaces:
Running
Running
File size: 21,467 Bytes
dec271c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CLUB44 - Habit Tracker</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Montserrat:wght@700&display=swap">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
body {
font-family: 'Montserrat', sans-serif;
background-color: #0a0a0a;
color: #ffffff;
-webkit-tap-highlight-color: transparent;
}
.habit-card {
transition: all 0.3s ease;
transform-origin: top;
}
.habit-card.expanded {
transform: scaleY(1.1);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.streak-flame {
animation: pulse 1.5s infinite alternate;
}
@keyframes pulse {
0% { opacity: 0.8; }
100% { opacity: 1; }
}
.progress-bar {
transition: width 0.5s ease;
}
.toggle-switch {
transition: all 0.3s ease;
}
.toggle-switch:active {
transform: scale(0.95);
}
</style>
</head>
<body class="max-w-md mx-auto relative overflow-hidden" style="height: 100vh;">
<!-- Main Content -->
<div class="container mx-auto px-4 py-6 h-full flex flex-col">
<!-- Header -->
<div class="flex justify-between items-center mb-6">
<div>
<h1 class="text-2xl font-bold text-white">Habit Logs</h1>
<p class="text-gray-400 text-sm">Today, June 12</p>
</div>
<div class="flex space-x-3">
<button class="bg-gray-800 p-2 rounded-full">
<i class="fas fa-filter text-gray-400"></i>
</button>
<button class="bg-gray-800 p-2 rounded-full">
<i class="fas fa-calendar text-gray-400"></i>
</button>
</div>
</div>
<!-- Streak Counter -->
<div class="bg-gradient-to-r from-indigo-900 to-purple-900 rounded-xl p-4 mb-6 flex items-center justify-between">
<div>
<p class="text-gray-300 text-sm">Current Streak</p>
<div class="flex items-center mt-1">
<div class="streak-flame text-yellow-400 mr-2">
<i class="fas fa-fire text-2xl"></i>
</div>
<h2 class="text-3xl font-bold">14 <span class="text-lg text-gray-300">days</span></h2>
</div>
</div>
<div class="text-right">
<p class="text-gray-300 text-sm">Best Streak</p>
<h2 class="text-3xl font-bold">27 <span class="text-lg text-gray-300">days</span></h2>
</div>
</div>
<!-- Habits List -->
<div class="flex-1 overflow-y-auto pb-20">
<!-- Habit Card 1 -->
<div class="habit-card bg-gray-900 rounded-xl p-4 mb-4 relative overflow-hidden">
<div class="flex justify-between items-center">
<div>
<h3 class="font-bold text-lg">Morning Routine</h3>
<p class="text-gray-400 text-sm">5:30 AM - 6:30 AM</p>
</div>
<div class="flex items-center">
<span class="text-yellow-400 text-sm font-bold mr-3">3/5</span>
<div class="relative">
<div class="toggle-switch w-12 h-6 bg-gray-700 rounded-full p-1 cursor-pointer">
<div class="w-4 h-4 bg-purple-500 rounded-full transition-transform duration-300 transform translate-x-6"></div>
</div>
</div>
</div>
</div>
<!-- Progress Bar -->
<div class="mt-3">
<div class="w-full bg-gray-800 rounded-full h-2">
<div class="progress-bar bg-gradient-to-r from-purple-500 to-indigo-500 h-2 rounded-full" style="width: 60%"></div>
</div>
</div>
<!-- Expanded Content (hidden by default) -->
<div class="mt-4 hidden">
<div class="flex justify-between text-sm mb-2">
<span class="text-gray-400">Started: May 29</span>
<span class="text-gray-400">Completion: 72%</span>
</div>
<div class="grid grid-cols-5 gap-2 mt-3">
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Mon</p>
<i class="fas fa-check text-green-400"></i>
</div>
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Tue</p>
<i class="fas fa-check text-green-400"></i>
</div>
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Wed</p>
<i class="fas fa-check text-green-400"></i>
</div>
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Thu</p>
<i class="fas fa-times text-red-400"></i>
</div>
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Fri</p>
<i class="fas fa-times text-red-400"></i>
</div>
</div>
<div class="mt-4 flex space-x-2">
<button class="flex-1 bg-gray-800 text-gray-300 py-2 rounded-lg text-sm">Edit</button>
<button class="flex-1 bg-purple-600 text-white py-2 rounded-lg text-sm">Details</button>
</div>
</div>
</div>
<!-- Habit Card 2 -->
<div class="habit-card bg-gray-900 rounded-xl p-4 mb-4 relative overflow-hidden">
<div class="flex justify-between items-center">
<div>
<h3 class="font-bold text-lg">Gym Session</h3>
<p class="text-gray-400 text-sm">7:00 AM - 8:30 AM</p>
</div>
<div class="flex items-center">
<span class="text-yellow-400 text-sm font-bold mr-3">5/5</span>
<div class="relative">
<div class="toggle-switch w-12 h-6 bg-gray-700 rounded-full p-1 cursor-pointer">
<div class="w-4 h-4 bg-green-500 rounded-full transition-transform duration-300"></div>
</div>
</div>
</div>
</div>
<!-- Progress Bar -->
<div class="mt-3">
<div class="w-full bg-gray-800 rounded-full h-2">
<div class="progress-bar bg-gradient-to-r from-green-500 to-teal-500 h-2 rounded-full" style="width: 100%"></div>
</div>
</div>
<!-- Expanded Content (hidden by default) -->
<div class="mt-4 hidden">
<div class="flex justify-between text-sm mb-2">
<span class="text-gray-400">Started: June 1</span>
<span class="text-gray-400">Completion: 100%</span>
</div>
<div class="grid grid-cols-5 gap-2 mt-3">
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Mon</p>
<i class="fas fa-check text-green-400"></i>
</div>
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Tue</p>
<i class="fas fa-check text-green-400"></i>
</div>
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Wed</p>
<i class="fas fa-check text-green-400"></i>
</div>
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Thu</p>
<i class="fas fa-check text-green-400"></i>
</div>
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Fri</p>
<i class="fas fa-check text-green-400"></i>
</div>
</div>
<div class="mt-4 flex space-x-2">
<button class="flex-1 bg-gray-800 text-gray-300 py-2 rounded-lg text-sm">Edit</button>
<button class="flex-1 bg-green-600 text-white py-2 rounded-lg text-sm">Details</button>
</div>
</div>
</div>
<!-- Habit Card 3 -->
<div class="habit-card bg-gray-900 rounded-xl p-4 mb-4 relative overflow-hidden">
<div class="flex justify-between items-center">
<div>
<h3 class="font-bold text-lg">Cold Shower</h3>
<p class="text-gray-400 text-sm">After workout</p>
</div>
<div class="flex items-center">
<span class="text-yellow-400 text-sm font-bold mr-3">2/5</span>
<div class="relative">
<div class="toggle-switch w-12 h-6 bg-gray-700 rounded-full p-1 cursor-pointer">
<div class="w-4 h-4 bg-blue-500 rounded-full transition-transform duration-300 transform translate-x-6"></div>
</div>
</div>
</div>
</div>
<!-- Progress Bar -->
<div class="mt-3">
<div class="w-full bg-gray-800 rounded-full h-2">
<div class="progress-bar bg-gradient-to-r from-blue-500 to-cyan-500 h-2 rounded-full" style="width: 40%"></div>
</div>
</div>
<!-- Expanded Content (hidden by default) -->
<div class="mt-4 hidden">
<div class="flex justify-between text-sm mb-2">
<span class="text-gray-400">Started: June 5</span>
<span class="text-gray-400">Completion: 35%</span>
</div>
<div class="grid grid-cols-5 gap-2 mt-3">
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Mon</p>
<i class="fas fa-times text-red-400"></i>
</div>
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Tue</p>
<i class="fas fa-check text-green-400"></i>
</div>
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Wed</p>
<i class="fas fa-times text-red-400"></i>
</div>
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Thu</p>
<i class="fas fa-check text-green-400"></i>
</div>
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Fri</p>
<i class="fas fa-times text-red-400"></i>
</div>
</div>
<div class="mt-4 flex space-x-2">
<button class="flex-1 bg-gray-800 text-gray-300 py-2 rounded-lg text-sm">Edit</button>
<button class="flex-1 bg-blue-600 text-white py-2 rounded-lg text-sm">Details</button>
</div>
</div>
</div>
<!-- Habit Card 4 -->
<div class="habit-card bg-gray-900 rounded-xl p-4 mb-4 relative overflow-hidden">
<div class="flex justify-between items-center">
<div>
<h3 class="font-bold text-lg">Reading</h3>
<p class="text-gray-400 text-sm">30 min before bed</p>
</div>
<div class="flex items-center">
<span class="text-yellow-400 text-sm font-bold mr-3">4/5</span>
<div class="relative">
<div class="toggle-switch w-12 h-6 bg-gray-700 rounded-full p-1 cursor-pointer">
<div class="w-4 h-4 bg-orange-500 rounded-full transition-transform duration-300 transform translate-x-0"></div>
</div>
</div>
</div>
</div>
<!-- Progress Bar -->
<div class="mt-3">
<div class="w-full bg-gray-800 rounded-full h-2">
<div class="progress-bar bg-gradient-to-r from-orange-500 to-amber-500 h-2 rounded-full" style="width: 80%"></div>
</div>
</div>
<!-- Expanded Content (hidden by default) -->
<div class="mt-4 hidden">
<div class="flex justify-between text-sm mb-2">
<span class="text-gray-400">Started: May 20</span>
<span class="text-gray-400">Completion: 85%</span>
</div>
<div class="grid grid-cols-5 gap-2 mt-3">
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Mon</p>
<i class="fas fa-check text-green-400"></i>
</div>
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Tue</p>
<i class="fas fa-check text-green-400"></i>
</div>
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Wed</p>
<i class="fas fa-check text-green-400"></i>
</div>
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Thu</p>
<i class="fas fa-check text-green-400"></i>
</div>
<div class="bg-gray-800 rounded p-2 text-center">
<p class="text-xs text-gray-400">Fri</p>
<i class="fas fa-times text-red-400"></i>
</div>
</div>
<div class="mt-4 flex space-x-2">
<button class="flex-1 bg-gray-800 text-gray-300 py-2 rounded-lg text-sm">Edit</button>
<button class="flex-1 bg-orange-600 text-white py-2 rounded-lg text-sm">Details</button>
</div>
</div>
</div>
</div>
<!-- Add New Habit Button -->
<div class="absolute bottom-24 right-6">
<button id="addHabitBtn" class="bg-purple-600 w-14 h-14 rounded-full flex items-center justify-center shadow-lg hover:bg-purple-700 transition-colors">
<i class="fas fa-plus text-white text-xl"></i>
</button>
</div>
</div>
<!-- Bottom Navigation -->
<div class="absolute bottom-0 left-0 right-0 bg-gray-900 border-t border-gray-800 flex justify-around py-3">
<a href="#" class="text-purple-500 flex flex-col items-center">
<i class="fas fa-home text-xl"></i>
<span class="text-xs mt-1">Dashboard</span>
</a>
<a href="#" class="text-white flex flex-col items-center">
<i class="fas fa-list-check text-xl"></i>
<span class="text-xs mt-1">Logs</span>
</a>
<a href="#" class="text-gray-500 flex flex-col items-center">
<i class="fas fa-vault text-xl"></i>
<span class="text-xs mt-1">Vault</span>
</a>
<a href="#" class="text-gray-500 flex flex-col items-center">
<i class="fas fa-book text-xl"></i>
<span class="text-xs mt-1">Journal</span>
</a>
<a href="#" class="text-gray-500 flex flex-col items-center">
<i class="fas fa-user text-xl"></i>
<span class="text-xs mt-1">Profile</span>
</a>
</div>
<script>
// Toggle habit card expansion
document.querySelectorAll('.habit-card').forEach(card => {
card.addEventListener('click', function(e) {
// Don't toggle if clicking on a button inside the card
if (e.target.tagName === 'BUTTON' || e.target.closest('button')) {
return;
}
const content = this.querySelector('.hidden');
this.classList.toggle('expanded');
if (content.classList.contains('hidden')) {
content.classList.remove('hidden');
content.classList.add('block');
} else {
content.classList.remove('block');
content.classList.add('hidden');
}
});
});
// Toggle switch functionality
document.querySelectorAll('.toggle-switch').forEach(switchEl => {
switchEl.addEventListener('click', function(e) {
e.stopPropagation();
const knob = this.querySelector('div');
if (knob.classList.contains('translate-x-6')) {
knob.classList.remove('translate-x-6');
knob.classList.add('translate-x-0');
knob.classList.remove('bg-purple-500', 'bg-green-500', 'bg-blue-500', 'bg-orange-500');
knob.classList.add('bg-gray-500');
} else {
knob.classList.remove('translate-x-0');
knob.classList.add('translate-x-6');
knob.classList.remove('bg-gray-500');
// Determine which color to use based on parent card
const card = this.closest('.habit-card');
if (card.querySelector('.bg-purple-600')) {
knob.classList.add('bg-purple-500');
} else if (card.querySelector('.bg-green-600')) {
knob.classList.add('bg-green-500');
} else if (card.querySelector('.bg-blue-600')) {
knob.classList.add('bg-blue-500');
} else {
knob.classList.add('bg-orange-500');
}
}
});
});
// Add habit button
document.getElementById('addHabitBtn').addEventListener('click', function() {
alert('Add new habit functionality would go here');
});
</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=44xClub/habits-log-example" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |