j1225d commited on
Commit
840b422
·
verified ·
1 Parent(s): af40898

Can you make a modal for the trends button? - Follow Up Deployment

Browse files
Files changed (1) hide show
  1. index.html +71 -2
index.html CHANGED
@@ -55,6 +55,58 @@
55
  <!-- Hidden canvas for share image -->
56
  <canvas id="shareCanvas" class="hidden"></canvas>
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  <!-- Workout Analytics Modal -->
59
  <div id="workoutModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center p-4 hidden">
60
  <div class="bg-gray-800 rounded-xl max-w-2xl w-full overflow-hidden shadow-2xl modal-enter">
@@ -317,9 +369,26 @@
317
  }, 'image/png', 1);
318
  });
319
 
320
- // View trends button functionality
 
 
 
321
  document.querySelector('button:has(.fa-chart-line)').addEventListener('click', () => {
322
- alert('Trends feature coming soon! This would show your progress over time with interactive charts.');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
323
  });
324
  </script>
325
  <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=j1225d/workout-complete" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
 
55
  <!-- Hidden canvas for share image -->
56
  <canvas id="shareCanvas" class="hidden"></canvas>
57
 
58
+ <!-- Trends Modal -->
59
+ <div id="trendsModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center p-4 hidden">
60
+ <div class="bg-gray-800 rounded-xl max-w-4xl w-full overflow-hidden shadow-2xl modal-enter">
61
+ <!-- Modal Header -->
62
+ <div class="gold-bg p-6 border-b gold-border">
63
+ <div class="flex justify-between items-center">
64
+ <h2 class="text-2xl font-bold gold-text">Your Workout Trends</h2>
65
+ <button id="closeTrendsModalBtn" class="text-gray-400 hover:text-white">
66
+ <i class="fas fa-times text-xl"></i>
67
+ </button>
68
+ </div>
69
+ <p class="mt-2 text-amber-200">See how far you've come!</p>
70
+ </div>
71
+
72
+ <!-- Modal Body -->
73
+ <div class="p-6">
74
+ <!-- Chart Placeholders -->
75
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
76
+ <div class="bg-gray-700 rounded-lg p-4">
77
+ <h3 class="text-lg font-semibold mb-4 gold-text">Weekly Workouts</h3>
78
+ <div class="h-64 bg-gray-600 rounded flex items-center justify-center">
79
+ <p class="text-gray-400">Line chart would appear here</p>
80
+ </div>
81
+ </div>
82
+ <div class="bg-gray-700 rounded-lg p-4">
83
+ <h3 class="text-lg font-semibold mb-4 gold-text">Calories Burned</h3>
84
+ <div class="h-64 bg-gray-600 rounded flex items-center justify-center">
85
+ <p class="text-gray-400">Bar chart would appear here</p>
86
+ </div>
87
+ </div>
88
+ </div>
89
+
90
+ <!-- Progress Over Time -->
91
+ <div class="mb-6">
92
+ <h3 class="text-lg font-semibold mb-4 gold-text">Strength Progress</h3>
93
+ <div class="bg-gray-700 rounded-lg p-4">
94
+ <div class="h-64 bg-gray-600 rounded flex items-center justify-center">
95
+ <p class="text-gray-400">Progress chart would appear here</p>
96
+ </div>
97
+ </div>
98
+ </div>
99
+
100
+ <!-- Action Buttons -->
101
+ <div class="flex justify-end gap-3">
102
+ <button class="bg-amber-600 hover:bg-amber-700 text-white font-bold py-2 px-4 rounded-lg transition-all">
103
+ <i class="fas fa-download mr-2"></i> Export Data
104
+ </button>
105
+ </div>
106
+ </div>
107
+ </div>
108
+ </div>
109
+
110
  <!-- Workout Analytics Modal -->
111
  <div id="workoutModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center p-4 hidden">
112
  <div class="bg-gray-800 rounded-xl max-w-2xl w-full overflow-hidden shadow-2xl modal-enter">
 
369
  }, 'image/png', 1);
370
  });
371
 
372
+ // Trends modal functionality
373
+ const trendsModal = document.getElementById('trendsModal');
374
+ const closeTrendsModalBtn = document.getElementById('closeTrendsModalBtn');
375
+
376
  document.querySelector('button:has(.fa-chart-line)').addEventListener('click', () => {
377
+ trendsModal.classList.remove('hidden');
378
+ document.body.style.overflow = 'hidden';
379
+ });
380
+
381
+ closeTrendsModalBtn.addEventListener('click', () => {
382
+ trendsModal.classList.add('hidden');
383
+ document.body.style.overflow = 'auto';
384
+ });
385
+
386
+ // Close modal when clicking outside
387
+ trendsModal.addEventListener('click', (e) => {
388
+ if (e.target === trendsModal) {
389
+ trendsModal.classList.add('hidden');
390
+ document.body.style.overflow = 'auto';
391
+ }
392
  });
393
  </script>
394
  <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=j1225d/workout-complete" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>