rrr257 commited on
Commit
5bd895b
·
1 Parent(s): b2f3b0c

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +63 -76
index.html CHANGED
@@ -33,6 +33,7 @@ box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
33
  padding: 2rem;
34
  margin-bottom: 2rem;
35
  }
 
36
  .theme-title {
37
  font-size: 1.25rem;
38
  font-weight: 600;
@@ -56,17 +57,13 @@ cursor: pointer;
56
  transition: all 0.2s;
57
  text-align: center;
58
  font-size: 1rem;
 
59
  }
60
  .theme-btn:hover {
61
  background: #ede9fe;
62
- border-color: #a78bfa;
63
  transform: translateY(-2px);
64
  }
65
- .theme-btn.active {
66
- background: #7c3aed;
67
- color: white;
68
- border-color: #6d28d9;
69
- }
70
  .topics-container {
71
  display: none;
72
  }
@@ -119,20 +116,12 @@ opacity: 0.6;
119
  transform: none;
120
  box-shadow: none;
121
  }
122
- .topic-card.selected {
123
- background: #7c3aed;
124
- border-color: #6d28d9;
125
- color: white;
126
- }
127
  .topic-number {
128
  font-size: 0.75rem;
129
  font-weight: 700;
130
  color: #7c3aed;
131
  margin-bottom: 0.5rem;
132
  }
133
- .topic-card.selected .topic-number {
134
- color: #fef3c7;
135
- }
136
  .topic-card.used .topic-number {
137
  color: #9ca3af;
138
  }
@@ -141,9 +130,6 @@ font-size: 0.95rem;
141
  line-height: 1.5;
142
  color: #1f2937;
143
  }
144
- .topic-card.selected .topic-text {
145
- color: white;
146
- }
147
  .topic-card.used .topic-text {
148
  color: #6b7280;
149
  }
@@ -307,15 +293,7 @@ line-height: 1.5;
307
 
308
  <div class="theme-selection" id="themeSelection">
309
  <h2 class="theme-title">Select a Theme for This Meeting</h2>
310
- <div class="themes">
311
- <button class="theme-btn" data-theme="if-you-could">🌟 If You Could...</button>
312
- <button class="theme-btn" data-theme="unpopular">💭 Unpopular Opinions</button>
313
- <button class="theme-btn" data-theme="what-would">🤔 What Would You Do?</button>
314
- <button class="theme-btn" data-theme="throwback">📸 Throwback</button>
315
- <button class="theme-btn" data-theme="expert">🎓 You're the Expert</button>
316
- <button class="theme-btn" data-theme="big-questions">🌍 The Big Questions</button>
317
- <button class="theme-btn" data-theme="would-rather">⚖️ Would You Rather</button>
318
- </div>
319
  </div>
320
 
321
  <div class="topics-container" id="topicsContainer">
@@ -479,41 +457,47 @@ topics: [
479
 
480
  let currentTheme = null;
481
  let usedTopics = [];
482
- let selectedTopicIndex = null;
483
  let timerInterval = null;
484
  let timeElapsed = 0;
485
  let isRunning = false;
486
 
487
- const themeSelection = document.getElementById('themeSelection');
488
- const topicsContainer = document.getElementById('topicsContainer');
489
- const speakingSection = document.getElementById('speakingSection');
490
- const currentThemeName = document.getElementById('currentThemeName');
491
- const topicsGrid = document.getElementById('topicsGrid');
492
- const selectedTopicText = document.getElementById('selectedTopicText');
493
- const timerDisplay = document.getElementById('timerDisplay');
494
- const startBtn = document.getElementById('startBtn');
495
- const nextSpeakerBtn = document.getElementById('nextSpeakerBtn');
496
- const backBtn = document.getElementById('backBtn');
497
- const backToTopicsBtn = document.getElementById('backToTopicsBtn');
498
- const resetUsedBtn = document.getElementById('resetUsedBtn');
 
 
 
 
 
 
 
 
 
499
 
500
- // Theme selection
501
- document.querySelectorAll('.theme-btn').forEach(btn => {
502
- btn.addEventListener('click', () => {
503
- currentTheme = btn.dataset.theme;
504
  usedTopics = [];
505
  showTopics();
506
- });
507
- });
508
 
509
  function showTopics() {
510
- themeSelection.style.display = 'none';
511
- topicsContainer.classList.add('active');
512
- currentThemeName.textContent = themes[currentTheme].name;
513
  renderTopics();
514
  }
515
 
516
  function renderTopics() {
 
517
  topicsGrid.innerHTML = '';
518
  themes[currentTheme].topics.forEach((topic, index) => {
519
  const card = document.createElement('div');
@@ -527,18 +511,17 @@ card.innerHTML = `
527
  ${usedTopics.includes(index) ? '<div class="used-badge">USED</div>' : ''}
528
  `;
529
  if (!usedTopics.includes(index)) {
530
- card.addEventListener('click', () => selectTopic(index));
531
  }
532
  topicsGrid.appendChild(card);
533
  });
534
  }
535
 
536
  function selectTopic(index) {
537
- selectedTopicIndex = index;
538
- selectedTopicText.textContent = themes[currentTheme].topics[index];
539
  usedTopics.push(index);
540
- topicsContainer.classList.remove('active');
541
- speakingSection.classList.add('active');
542
  resetTimer();
543
  }
544
 
@@ -547,29 +530,29 @@ clearInterval(timerInterval);
547
  isRunning = false;
548
  timeElapsed = 0;
549
  updateTimerDisplay();
550
- startBtn.disabled = false;
551
  }
552
 
553
  function updateTimerDisplay() {
554
  const minutes = Math.floor(timeElapsed / 60);
555
  const seconds = timeElapsed % 60;
556
- timerDisplay.textContent = `${minutes}:${seconds.toString().padStart(2, '0')}`;
 
557
 
558
- // Update color based on time
559
- timerDisplay.classList.remove('green', 'yellow', 'red');
560
  if (timeElapsed < 60) {
561
- timerDisplay.classList.add('green');
562
  } else if (timeElapsed < 90) {
563
- timerDisplay.classList.add('yellow');
564
  } else {
565
- timerDisplay.classList.add('red');
566
  }
567
  }
568
 
569
  function startTimer() {
570
  if (isRunning) return;
571
  isRunning = true;
572
- startBtn.disabled = true;
573
 
574
  timerInterval = setInterval(() => {
575
  timeElapsed++;
@@ -582,32 +565,36 @@ isRunning = false;
582
  }, 1000);
583
  }
584
 
585
- startBtn.addEventListener('click', startTimer);
 
586
 
587
- nextSpeakerBtn.addEventListener('click', () => {
588
- speakingSection.classList.remove('active');
589
- topicsContainer.classList.add('active');
590
  renderTopics();
591
  resetTimer();
592
- });
593
 
594
- backBtn.addEventListener('click', () => {
595
- topicsContainer.classList.remove('active');
596
- themeSelection.style.display = 'block';
597
- });
598
 
599
- backToTopicsBtn.addEventListener('click', () => {
600
- speakingSection.classList.remove('active');
601
- topicsContainer.classList.add('active');
602
  resetTimer();
603
- });
604
 
605
- resetUsedBtn.addEventListener('click', () => {
606
  if (confirm('Reset all used topics for this theme?')) {
607
  usedTopics = [];
608
  renderTopics();
609
  }
610
- });
 
 
 
611
  </script>
612
  </body>
613
  </html>
 
33
  padding: 2rem;
34
  margin-bottom: 2rem;
35
  }
36
+ .theme-selection.hidden { display: none; }
37
  .theme-title {
38
  font-size: 1.25rem;
39
  font-weight: 600;
 
57
  transition: all 0.2s;
58
  text-align: center;
59
  font-size: 1rem;
60
+ border: none;
61
  }
62
  .theme-btn:hover {
63
  background: #ede9fe;
64
+ border: 2px solid #a78bfa;
65
  transform: translateY(-2px);
66
  }
 
 
 
 
 
67
  .topics-container {
68
  display: none;
69
  }
 
116
  transform: none;
117
  box-shadow: none;
118
  }
 
 
 
 
 
119
  .topic-number {
120
  font-size: 0.75rem;
121
  font-weight: 700;
122
  color: #7c3aed;
123
  margin-bottom: 0.5rem;
124
  }
 
 
 
125
  .topic-card.used .topic-number {
126
  color: #9ca3af;
127
  }
 
130
  line-height: 1.5;
131
  color: #1f2937;
132
  }
 
 
 
133
  .topic-card.used .topic-text {
134
  color: #6b7280;
135
  }
 
293
 
294
  <div class="theme-selection" id="themeSelection">
295
  <h2 class="theme-title">Select a Theme for This Meeting</h2>
296
+ <div class="themes" id="themesContainer"></div>
 
 
 
 
 
 
 
 
297
  </div>
298
 
299
  <div class="topics-container" id="topicsContainer">
 
457
 
458
  let currentTheme = null;
459
  let usedTopics = [];
 
460
  let timerInterval = null;
461
  let timeElapsed = 0;
462
  let isRunning = false;
463
 
464
+ // Initialize theme buttons
465
+ function initThemeButtons() {
466
+ const themesContainer = document.getElementById('themesContainer');
467
+ const themeButtons = [
468
+ { id: 'if-you-could', emoji: '🌟', text: 'If You Could...' },
469
+ { id: 'unpopular', emoji: '💭', text: 'Unpopular Opinions' },
470
+ { id: 'what-would', emoji: '🤔', text: 'What Would You Do?' },
471
+ { id: 'throwback', emoji: '📸', text: 'Throwback' },
472
+ { id: 'expert', emoji: '🎓', text: 'You're the Expert' },
473
+ { id: 'big-questions', emoji: '🌍', text: 'The Big Questions' },
474
+ { id: 'would-rather', emoji: '⚖️', text: 'Would You Rather' }
475
+ ];
476
+
477
+ themeButtons.forEach(theme => {
478
+ const btn = document.createElement('button');
479
+ btn.className = 'theme-btn';
480
+ btn.textContent = `${theme.emoji} ${theme.text}`;
481
+ btn.onclick = () => selectTheme(theme.id);
482
+ themesContainer.appendChild(btn);
483
+ });
484
+ }
485
 
486
+ function selectTheme(themeId) {
487
+ currentTheme = themeId;
 
 
488
  usedTopics = [];
489
  showTopics();
490
+ }
 
491
 
492
  function showTopics() {
493
+ document.getElementById('themeSelection').classList.add('hidden');
494
+ document.getElementById('topicsContainer').classList.add('active');
495
+ document.getElementById('currentThemeName').textContent = themes[currentTheme].name;
496
  renderTopics();
497
  }
498
 
499
  function renderTopics() {
500
+ const topicsGrid = document.getElementById('topicsGrid');
501
  topicsGrid.innerHTML = '';
502
  themes[currentTheme].topics.forEach((topic, index) => {
503
  const card = document.createElement('div');
 
511
  ${usedTopics.includes(index) ? '<div class="used-badge">USED</div>' : ''}
512
  `;
513
  if (!usedTopics.includes(index)) {
514
+ card.onclick = () => selectTopic(index);
515
  }
516
  topicsGrid.appendChild(card);
517
  });
518
  }
519
 
520
  function selectTopic(index) {
521
+ document.getElementById('selectedTopicText').textContent = themes[currentTheme].topics[index];
 
522
  usedTopics.push(index);
523
+ document.getElementById('topicsContainer').classList.remove('active');
524
+ document.getElementById('speakingSection').classList.add('active');
525
  resetTimer();
526
  }
527
 
 
530
  isRunning = false;
531
  timeElapsed = 0;
532
  updateTimerDisplay();
533
+ document.getElementById('startBtn').disabled = false;
534
  }
535
 
536
  function updateTimerDisplay() {
537
  const minutes = Math.floor(timeElapsed / 60);
538
  const seconds = timeElapsed % 60;
539
+ const display = document.getElementById('timerDisplay');
540
+ display.textContent = `${minutes}:${seconds.toString().padStart(2, '0')}`;
541
 
542
+ display.classList.remove('green', 'yellow', 'red');
 
543
  if (timeElapsed < 60) {
544
+ display.classList.add('green');
545
  } else if (timeElapsed < 90) {
546
+ display.classList.add('yellow');
547
  } else {
548
+ display.classList.add('red');
549
  }
550
  }
551
 
552
  function startTimer() {
553
  if (isRunning) return;
554
  isRunning = true;
555
+ document.getElementById('startBtn').disabled = true;
556
 
557
  timerInterval = setInterval(() => {
558
  timeElapsed++;
 
565
  }, 1000);
566
  }
567
 
568
+ // Event listeners
569
+ document.getElementById('startBtn').onclick = startTimer;
570
 
571
+ document.getElementById('nextSpeakerBtn').onclick = () => {
572
+ document.getElementById('speakingSection').classList.remove('active');
573
+ document.getElementById('topicsContainer').classList.add('active');
574
  renderTopics();
575
  resetTimer();
576
+ };
577
 
578
+ document.getElementById('backBtn').onclick = () => {
579
+ document.getElementById('topicsContainer').classList.remove('active');
580
+ document.getElementById('themeSelection').classList.remove('hidden');
581
+ };
582
 
583
+ document.getElementById('backToTopicsBtn').onclick = () => {
584
+ document.getElementById('speakingSection').classList.remove('active');
585
+ document.getElementById('topicsContainer').classList.add('active');
586
  resetTimer();
587
+ };
588
 
589
+ document.getElementById('resetUsedBtn').onclick = () => {
590
  if (confirm('Reset all used topics for this theme?')) {
591
  usedTopics = [];
592
  renderTopics();
593
  }
594
+ };
595
+
596
+ // Initialize on load
597
+ initThemeButtons();
598
  </script>
599
  </body>
600
  </html>