Ptwo commited on
Commit
63fff87
·
verified ·
1 Parent(s): ec3e210

complete all ,bottom bar , all the clickable , actions - Follow Up Deployment

Browse files
Files changed (1) hide show
  1. index.html +83 -23
index.html CHANGED
@@ -22,6 +22,15 @@
22
  }
23
  </script>
24
  <style>
 
 
 
 
 
 
 
 
 
25
  .hero-gradient {
26
  background: linear-gradient(135deg, #4e60ff 0%, #8e9dff 100%);
27
  }
@@ -429,36 +438,73 @@
429
  <button class="text-primary text-xs font-medium">Dismiss</button>
430
  </div>
431
 
432
- <!-- Tab Navigation -->
433
- <div class="fixed bottom-0 left-0 right-0 bg-white border-t py-3 px-6">
434
- <div class="flex justify-between">
435
- <button class="text-primary">
436
- <i class="fas fa-home text-xl mb-1"></i>
437
- </button>
438
- <button class="text-gray-400">
439
- <i class="fas fa-heart text-xl mb-1"></i>
440
- </button>
441
- <button class="text-gray-400">
442
- <i class="fas fa-chart-pie text-xl mb-1"></i>
443
- </button>
444
- <button class="text-gray-400">
445
- <i class="fas fa-user text-xl mb-1"></i>
446
- </button>
 
 
 
 
447
  </div>
448
  </div>
449
 
450
  </div>
451
 
452
  <script>
453
- // Simple data persistence to simulate app functionality
454
  document.addEventListener('DOMContentLoaded', function() {
455
-
456
- // Example functionality for the cravings tracker
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
457
  const calendarDays = document.querySelectorAll('[class*="aspect-square"]');
458
-
459
  calendarDays.forEach(day => {
460
  day.addEventListener('click', function() {
461
- // Simulate day marking based on click position
462
  if(this.classList.contains('border-b-2')) {
463
  this.classList.remove('border-b-2', 'border-primary');
464
  this.classList.add('bg-gradient-to-r', 'from-primary', 'to-secondary', 'text-white');
@@ -470,11 +516,25 @@
470
  }
471
  });
472
  });
473
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
474
  // Update stats daily (simulated)
475
  setTimeout(() => {
476
- document.querySelector('[aria-label="Days streak"]').textContent = '15';
477
- document.querySelector('[aria-label="Money saved"]').textContent = '$132';
478
  }, 3000);
479
  });
480
  </script>
 
22
  }
23
  </script>
24
  <style>
25
+ @keyframes fade-in-out {
26
+ 0% { opacity: 0; transform: translateY(10px); }
27
+ 10% { opacity: 1; transform: translateY(0); }
28
+ 90% { opacity: 1; transform: translateY(0); }
29
+ 100% { opacity: 0; transform: translateY(-10px); }
30
+ }
31
+ .animate-fade-in-out {
32
+ animation: fade-in-out 2s ease-in-out forwards;
33
+ }
34
  .hero-gradient {
35
  background: linear-gradient(135deg, #4e60ff 0%, #8e9dff 100%);
36
  }
 
438
  <button class="text-primary text-xs font-medium">Dismiss</button>
439
  </div>
440
 
441
+ <!-- Bottom Navigation -->
442
+ <div class="fixed bottom-0 left-0 right-0 bg-white border-t">
443
+ <div class="flex justify-around">
444
+ <a href="#" class="flex flex-col items-center py-3 px-6 text-primary">
445
+ <i class="fas fa-home text-lg mb-1"></i>
446
+ <span class="text-xs">Home</span>
447
+ </a>
448
+ <a href="#" class="flex flex-col items-center py-3 px-6 text-gray-500">
449
+ <i class="fas fa-clipboard-list text-lg mb-1"></i>
450
+ <span class="text-xs">Tips</span>
451
+ </a>
452
+ <a href="#" class="flex flex-col items-center py-3 px-6 text-gray-500">
453
+ <i class="fas fa-chart-line text-lg mb-1"></i>
454
+ <span class="text-xs">Progress</span>
455
+ </a>
456
+ <a href="#" class="flex flex-col items-center py-3 px-6 text-gray-500">
457
+ <i class="fas fa-cog text-lg mb-1"></i>
458
+ <span class="text-xs">Settings</span>
459
+ </a>
460
  </div>
461
  </div>
462
 
463
  </div>
464
 
465
  <script>
 
466
  document.addEventListener('DOMContentLoaded', function() {
467
+ // Navigation handling
468
+ const navLinks = document.querySelectorAll('nav button, .fixed.bottom-0 a');
469
+ navLinks.forEach(link => {
470
+ link.addEventListener('click', function(e) {
471
+ e.preventDefault();
472
+ // Remove active state from all links
473
+ navLinks.forEach(l => {
474
+ l.classList.remove('text-primary', 'border-primary', 'font-medium');
475
+ l.classList.add('text-gray-500');
476
+ });
477
+ // Add active state to clicked link
478
+ this.classList.remove('text-gray-500');
479
+ this.classList.add('text-primary');
480
+ if(this.closest('nav')) {
481
+ this.classList.add('border-b-2', 'font-medium');
482
+ }
483
+ // Here you would normally load the appropriate content
484
+ console.log(`Navigating to: ${this.querySelector('span').textContent}`);
485
+ });
486
+ });
487
+
488
+ // Quick Actions handling
489
+ const quickActions = document.querySelectorAll('.grid.grid-cols-2 a');
490
+ quickActions.forEach(action => {
491
+ action.addEventListener('click', function(e) {
492
+ e.preventDefault();
493
+ const actionName = this.textContent.trim();
494
+ console.log(`Quick action: ${actionName}`);
495
+ // Show success feedback
496
+ const feedback = document.createElement('div');
497
+ feedback.className = 'fixed top-20 left-1/2 -translate-x-1/2 bg-green-500 text-white px-4 py-2 rounded-lg shadow-lg animate-fade-in-out';
498
+ feedback.textContent = `${actionName} started!`;
499
+ document.body.appendChild(feedback);
500
+ setTimeout(() => feedback.remove(), 2000);
501
+ });
502
+ });
503
+
504
+ // Cravings calendar handling
505
  const calendarDays = document.querySelectorAll('[class*="aspect-square"]');
 
506
  calendarDays.forEach(day => {
507
  day.addEventListener('click', function() {
 
508
  if(this.classList.contains('border-b-2')) {
509
  this.classList.remove('border-b-2', 'border-primary');
510
  this.classList.add('bg-gradient-to-r', 'from-primary', 'to-secondary', 'text-white');
 
516
  }
517
  });
518
  });
519
+
520
+ // Floating action button
521
+ const fab = document.querySelector('.fixed.bottom-24 button');
522
+ fab.addEventListener('click', function() {
523
+ console.log('FAB clicked - opening action menu');
524
+ // Here you would show a modal or menu with additional actions
525
+ });
526
+
527
+ // Dismiss health notification
528
+ const dismissBtn = document.querySelector('.fixed.bottom-40 button');
529
+ dismissBtn.addEventListener('click', function(e) {
530
+ e.preventDefault();
531
+ this.closest('.fixed.bottom-40').remove();
532
+ });
533
+
534
  // Update stats daily (simulated)
535
  setTimeout(() => {
536
+ document.querySelectorAll('.stat-card span')[0].textContent = '15 Days';
537
+ document.querySelectorAll('.stat-card span')[1].textContent = '$132';
538
  }, 3000);
539
  });
540
  </script>