rrr257 commited on
Commit
3d7d7db
·
1 Parent(s): 076fdf9

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +15 -25
index.html CHANGED
@@ -120,7 +120,7 @@
120
  color: white;
121
  }
122
 
123
- .choose-theme-btn:hover:not(:disabled) {
124
  background: #7c3aed;
125
  transform: translateY(-2px);
126
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
@@ -131,7 +131,7 @@
131
  color: white;
132
  }
133
 
134
- .next-speaker-btn:hover:not(:disabled) {
135
  background: #2563eb;
136
  transform: translateY(-2px);
137
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
@@ -142,7 +142,7 @@
142
  color: white;
143
  }
144
 
145
- .start-speaking-btn:hover:not(:disabled) {
146
  background: #059669;
147
  transform: translateY(-2px);
148
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
@@ -153,17 +153,12 @@
153
  color: white;
154
  }
155
 
156
- .reset-btn:hover:not(:disabled) {
157
  background: #dc2626;
158
  transform: translateY(-2px);
159
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
160
  }
161
 
162
- button:disabled {
163
- opacity: 0.5;
164
- cursor: not-allowed;
165
- }
166
-
167
  .topic-display {
168
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
169
  border-radius: 15px;
@@ -263,7 +258,7 @@
263
  </div>
264
 
265
  <div class="buttons">
266
- <button class="choose-theme-btn" id="chooseThemeBtn" disabled>Choose Theme</button>
267
  <button class="next-speaker-btn hidden" id="nextSpeakerBtn">Next Speaker</button>
268
  <button class="start-speaking-btn hidden" id="startSpeakingBtn">Start Speaking</button>
269
  <button class="reset-btn" id="resetBtn">Reset</button>
@@ -394,13 +389,15 @@
394
  themeOptions.forEach(opt => opt.classList.remove('selected'));
395
  option.classList.add('selected');
396
  selectedTheme = option.dataset.theme;
397
- chooseThemeBtn.disabled = false;
398
  });
399
  });
400
 
401
  // Choose theme button
402
  chooseThemeBtn.addEventListener('click', () => {
403
- if (!selectedTheme) return;
 
 
 
404
 
405
  usedTopics = [];
406
  themeSelection.classList.add('hidden');
@@ -431,7 +428,6 @@
431
  nextSpeakerBtn.classList.add('hidden');
432
  startSpeakingBtn.classList.remove('hidden');
433
 
434
- // Reset timer display but don't start
435
  elapsedSeconds = 0;
436
  updateTimerDisplay();
437
  });
@@ -442,11 +438,16 @@
442
 
443
  isTimerRunning = true;
444
  elapsedSeconds = 0;
445
- startSpeakingBtn.disabled = true;
446
 
447
  timerInterval = setInterval(() => {
448
  elapsedSeconds++;
449
  updateTimerDisplay();
 
 
 
 
 
 
450
  }, 1000);
451
  });
452
 
@@ -464,10 +465,8 @@
464
  themeOptions.forEach(opt => opt.classList.remove('selected'));
465
  themeSelection.classList.remove('hidden');
466
  chooseThemeBtn.classList.remove('hidden');
467
- chooseThemeBtn.disabled = true;
468
  nextSpeakerBtn.classList.add('hidden');
469
  startSpeakingBtn.classList.add('hidden');
470
- startSpeakingBtn.disabled = false;
471
  topicDisplay.classList.add('hidden');
472
  placeholderText.classList.remove('hidden');
473
  placeholderText.textContent = 'Select a theme above';
@@ -480,7 +479,6 @@
480
  String(minutes).padStart(2, '0') + ':' +
481
  String(seconds).padStart(2, '0');
482
 
483
- // Traffic light colors
484
  timerDisplay.className = 'timer-display';
485
  if (elapsedSeconds < 60) {
486
  timerDisplay.classList.add('timer-green');
@@ -489,14 +487,6 @@
489
  } else {
490
  timerDisplay.classList.add('timer-red');
491
  }
492
-
493
- // Auto-stop at 2 minutes
494
- if (elapsedSeconds >= 120 && isTimerRunning) {
495
- clearInterval(timerInterval);
496
- isTimerRunning = false;
497
- startSpeakingBtn.disabled = false;
498
- nextSpeakerBtn.classList.remove('hidden');
499
- }
500
  }
501
 
502
  updateTimerDisplay();
 
120
  color: white;
121
  }
122
 
123
+ .choose-theme-btn:hover {
124
  background: #7c3aed;
125
  transform: translateY(-2px);
126
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
 
131
  color: white;
132
  }
133
 
134
+ .next-speaker-btn:hover {
135
  background: #2563eb;
136
  transform: translateY(-2px);
137
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
 
142
  color: white;
143
  }
144
 
145
+ .start-speaking-btn:hover {
146
  background: #059669;
147
  transform: translateY(-2px);
148
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
 
153
  color: white;
154
  }
155
 
156
+ .reset-btn:hover {
157
  background: #dc2626;
158
  transform: translateY(-2px);
159
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
160
  }
161
 
 
 
 
 
 
162
  .topic-display {
163
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
164
  border-radius: 15px;
 
258
  </div>
259
 
260
  <div class="buttons">
261
+ <button class="choose-theme-btn" id="chooseThemeBtn">Choose Theme</button>
262
  <button class="next-speaker-btn hidden" id="nextSpeakerBtn">Next Speaker</button>
263
  <button class="start-speaking-btn hidden" id="startSpeakingBtn">Start Speaking</button>
264
  <button class="reset-btn" id="resetBtn">Reset</button>
 
389
  themeOptions.forEach(opt => opt.classList.remove('selected'));
390
  option.classList.add('selected');
391
  selectedTheme = option.dataset.theme;
 
392
  });
393
  });
394
 
395
  // Choose theme button
396
  chooseThemeBtn.addEventListener('click', () => {
397
+ if (!selectedTheme) {
398
+ alert('Please select a theme first');
399
+ return;
400
+ }
401
 
402
  usedTopics = [];
403
  themeSelection.classList.add('hidden');
 
428
  nextSpeakerBtn.classList.add('hidden');
429
  startSpeakingBtn.classList.remove('hidden');
430
 
 
431
  elapsedSeconds = 0;
432
  updateTimerDisplay();
433
  });
 
438
 
439
  isTimerRunning = true;
440
  elapsedSeconds = 0;
 
441
 
442
  timerInterval = setInterval(() => {
443
  elapsedSeconds++;
444
  updateTimerDisplay();
445
+
446
+ if (elapsedSeconds >= 120) {
447
+ clearInterval(timerInterval);
448
+ isTimerRunning = false;
449
+ nextSpeakerBtn.classList.remove('hidden');
450
+ }
451
  }, 1000);
452
  });
453
 
 
465
  themeOptions.forEach(opt => opt.classList.remove('selected'));
466
  themeSelection.classList.remove('hidden');
467
  chooseThemeBtn.classList.remove('hidden');
 
468
  nextSpeakerBtn.classList.add('hidden');
469
  startSpeakingBtn.classList.add('hidden');
 
470
  topicDisplay.classList.add('hidden');
471
  placeholderText.classList.remove('hidden');
472
  placeholderText.textContent = 'Select a theme above';
 
479
  String(minutes).padStart(2, '0') + ':' +
480
  String(seconds).padStart(2, '0');
481
 
 
482
  timerDisplay.className = 'timer-display';
483
  if (elapsedSeconds < 60) {
484
  timerDisplay.classList.add('timer-green');
 
487
  } else {
488
  timerDisplay.classList.add('timer-red');
489
  }
 
 
 
 
 
 
 
 
490
  }
491
 
492
  updateTimerDisplay();