Spaces:
Running
Running
Download index.html from rrr257/TableTopics: direct link, hf CLI and curl.
- Browser
- Download file 20.3 kB
-
https://huggingface.co/spaces/rrr257/TableTopics/resolve/main/index.html
- Command line
-
hf download hf://spaces/rrr257/TableTopics/index.html
-
curl -L -o index.html https://huggingface.co/spaces/rrr257/TableTopics/resolve/main/index.html
20.3 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Table Topics Practice</title> | |
| <style> | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| min-height: 100vh; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| padding: 20px; | |
| } | |
| .container { | |
| background: white; | |
| border-radius: 20px; | |
| box-shadow: 0 20px 60px rgba(0,0,0,0.3); | |
| padding: 40px; | |
| max-width: 900px; | |
| width: 100%; | |
| } | |
| h1 { | |
| text-align: center; | |
| color: #333; | |
| margin-bottom: 30px; | |
| font-size: 2.5em; | |
| } | |
| .themes-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); | |
| gap: 20px; | |
| margin-bottom: 30px; | |
| } | |
| .theme-card { | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| border-radius: 15px; | |
| padding: 25px; | |
| color: white; | |
| cursor: pointer; | |
| transition: transform 0.3s, box-shadow 0.3s; | |
| text-align: center; | |
| } | |
| .theme-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 30px rgba(0,0,0,0.3); | |
| } | |
| .theme-card h3 { | |
| font-size: 1.4em; | |
| margin-bottom: 10px; | |
| } | |
| .theme-card p { | |
| font-size: 0.9em; | |
| opacity: 0.9; | |
| } | |
| .selected-theme { | |
| text-align: center; | |
| margin-bottom: 30px; | |
| } | |
| .selected-theme h2 { | |
| color: #667eea; | |
| font-size: 2em; | |
| margin-bottom: 20px; | |
| } | |
| .topic-display { | |
| background: #f8f9fa; | |
| border-radius: 15px; | |
| padding: 30px; | |
| margin-bottom: 30px; | |
| min-height: 150px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| text-align: center; | |
| } | |
| .topic-display h3 { | |
| color: #333; | |
| font-size: 1.5em; | |
| line-height: 1.6; | |
| } | |
| .timer-section { | |
| text-align: center; | |
| margin-bottom: 30px; | |
| } | |
| .timer-display { | |
| font-size: 4em; | |
| font-weight: bold; | |
| color: #333; | |
| margin-bottom: 20px; | |
| } | |
| .traffic-lights { | |
| display: flex; | |
| justify-content: center; | |
| gap: 30px; | |
| margin-bottom: 30px; | |
| } | |
| .light { | |
| width: 60px; | |
| height: 60px; | |
| border-radius: 50%; | |
| border: 3px solid #ddd; | |
| transition: all 0.3s; | |
| } | |
| .light.green { | |
| background-color: #e0e0e0; | |
| } | |
| .light.green.active { | |
| background-color: #4caf50; | |
| box-shadow: 0 0 20px #4caf50; | |
| border-color: #4caf50; | |
| } | |
| .light.yellow { | |
| background-color: #e0e0e0; | |
| } | |
| .light.yellow.active { | |
| background-color: #ffc107; | |
| box-shadow: 0 0 20px #ffc107; | |
| border-color: #ffc107; | |
| } | |
| .light.red { | |
| background-color: #e0e0e0; | |
| } | |
| .light.red.active { | |
| background-color: #f44336; | |
| box-shadow: 0 0 20px #f44336; | |
| border-color: #f44336; | |
| } | |
| .controls { | |
| display: flex; | |
| gap: 15px; | |
| justify-content: center; | |
| flex-wrap: wrap; | |
| } | |
| button { | |
| padding: 15px 30px; | |
| font-size: 1.1em; | |
| border: none; | |
| border-radius: 10px; | |
| cursor: pointer; | |
| transition: all 0.3s; | |
| font-weight: bold; | |
| } | |
| .btn-primary { | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| color: white; | |
| } | |
| .btn-primary:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4); | |
| } | |
| .btn-secondary { | |
| background: #6c757d; | |
| color: white; | |
| } | |
| .btn-secondary:hover { | |
| background: #5a6268; | |
| transform: translateY(-2px); | |
| } | |
| button:disabled { | |
| opacity: 0.5; | |
| cursor: not-allowed; | |
| transform: none ; | |
| } | |
| .hidden { | |
| display: none; | |
| } | |
| .message { | |
| text-align: center; | |
| padding: 20px; | |
| background: #fff3cd; | |
| border-radius: 10px; | |
| color: #856404; | |
| font-size: 1.2em; | |
| margin-bottom: 20px; | |
| } | |
| @media (max-width: 768px) { | |
| .container { | |
| padding: 20px; | |
| } | |
| h1 { | |
| font-size: 1.8em; | |
| } | |
| .timer-display { | |
| font-size: 3em; | |
| } | |
| .light { | |
| width: 50px; | |
| height: 50px; | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <h1>Table Topics Practice</h1> | |
| <!-- Opening Screen: Theme Selection --> | |
| <div id="themeSelection"> | |
| <div class="themes-grid"> | |
| <div class="theme-card" data-theme="0"> | |
| <h3>If You Could...</h3> | |
| <p>Fun & Imaginative</p> | |
| </div> | |
| <div class="theme-card" data-theme="1"> | |
| <h3>Unpopular Opinions</h3> | |
| <p>Fun & Edgy</p> | |
| </div> | |
| <div class="theme-card" data-theme="2"> | |
| <h3>What Would You Do?</h3> | |
| <p>Serious & Thoughtful</p> | |
| </div> | |
| <div class="theme-card" data-theme="3"> | |
| <h3>Throwback</h3> | |
| <p>Nostalgic & Personal</p> | |
| </div> | |
| <div class="theme-card" data-theme="4"> | |
| <h3>You're the Expert</h3> | |
| <p>Fun & Creative</p> | |
| </div> | |
| <div class="theme-card" data-theme="5"> | |
| <h3>The Big Questions</h3> | |
| <p>Serious & Philosophical</p> | |
| </div> | |
| <div class="theme-card" data-theme="6"> | |
| <h3>Would You Rather</h3> | |
| <p>Fun & Interactive</p> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Theme Selected Screen --> | |
| <div id="sessionScreen" class="hidden"> | |
| <div class="selected-theme"> | |
| <h2 id="themeName"></h2> | |
| </div> | |
| <div id="completionMessage" class="message hidden"> | |
| All topics used - click Reset to start over | |
| </div> | |
| <div id="topicDisplay" class="topic-display hidden"> | |
| <h3 id="topicText"></h3> | |
| </div> | |
| <div id="timerSection" class="timer-section hidden"> | |
| <div class="timer-display" id="timerDisplay">0:00</div> | |
| <div class="traffic-lights"> | |
| <div class="light green" id="greenLight"></div> | |
| <div class="light yellow" id="yellowLight"></div> | |
| <div class="light red" id="redLight"></div> | |
| </div> | |
| </div> | |
| <div class="controls"> | |
| <button id="nextSpeakerBtn" class="btn-primary">Next Speaker</button> | |
| <button id="startSpeakingBtn" class="btn-primary hidden">Start Speaking</button> | |
| <button id="resetBtn" class="btn-secondary">Reset</button> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| const themes = [ | |
| { | |
| name: "If You Could...", | |
| topics: [ | |
| "If you could have dinner with any person, living or dead, who would it be?", | |
| "If you could instantly master one skill, what would it be?", | |
| "If you could live in any fictional world, where would you go?", | |
| "If you could only eat one cuisine for the rest of your life, what would it be?", | |
| "If you could switch lives with someone for a week, who would it be?", | |
| "If you could eliminate one invention from history, what would it be?", | |
| "If you could speak any language fluently overnight, which would you choose?", | |
| "If you could bring back one extinct animal, what would it be?", | |
| "If you could time travel but only once, where would you go?" | |
| ] | |
| }, | |
| { | |
| name: "Unpopular Opinions", | |
| topics: [ | |
| "Pineapple belongs on pizza — agree or disagree?", | |
| "Mornings are better than evenings.", | |
| "Working from home is actually worse than the office.", | |
| "Social media has done more harm than good.", | |
| "Vacations are overrated.", | |
| "Pets are better companions than people.", | |
| "Winning isn't everything — participation matters just as much.", | |
| "Small talk is a waste of time.", | |
| "Dessert should be eaten before dinner." | |
| ] | |
| }, | |
| { | |
| name: "What Would You Do?", | |
| topics: [ | |
| "What would you do if you found out a close friend was being dishonest at work?", | |
| "What would you do if you witnessed someone being treated unfairly in public?", | |
| "What would you do if you were given $1 million but had to give half away?", | |
| "What would you do if you discovered your dream job made you miserable?", | |
| "What would you do if a family member asked you for advice you disagreed with?", | |
| "What would you do if you could redesign the education system from scratch?", | |
| "What would you do if you had one year left to live but were in perfect health?", | |
| "What would you do if you were elected mayor of your city tomorrow?" | |
| ] | |
| }, | |
| { | |
| name: "Throwback", | |
| topics: [ | |
| "What was your favorite thing about being a kid?", | |
| "What's a trend from your teenage years you're glad is gone?", | |
| "What's one piece of advice you wish you could give your younger self?", | |
| "What was your most memorable family vacation?", | |
| "What's a childhood fear you've since gotten over — or haven't?", | |
| "What's the best lesson a teacher ever taught you?", | |
| "What game or toy from your childhood meant the most to you?", | |
| "What's a moment from your past that changed the direction of your life?", | |
| "What did you want to be when you grew up, and how close did you get?" | |
| ] | |
| }, | |
| { | |
| name: "You're the Expert", | |
| topics: [ | |
| "You are the world's foremost expert on napping — share your wisdom.", | |
| "You've just written a book on how to have the perfect pizza night — what's in it?", | |
| "You're a leading scientist who just discovered why Mondays feel so hard — explain your findings.", | |
| "You're the world's top negotiator — how do you convince a toddler to eat vegetables?", | |
| "You're an architect designing the perfect home office — walk us through it.", | |
| "You've cracked the code on the perfect road trip — what's the secret?", | |
| "You're a renowned chef whose specialty is breakfast — make the case for it being the greatest meal.", | |
| "You're a psychologist who studies why people argue about the thermostat — what have you learned?" | |
| ] | |
| }, | |
| { | |
| name: "The Big Questions", | |
| topics: [ | |
| "What does success actually mean to you?", | |
| "Is it more important to be liked or to be respected?", | |
| "What's one thing society gets completely wrong?", | |
| "What does it mean to live a good life?", | |
| "Is change something to embrace or something to be cautious about?", | |
| "What's the most important quality in a leader?", | |
| "Do people fundamentally change, or do they just adapt?", | |
| "What responsibility do we have to future generations?", | |
| "Is it possible to be truly selfless, or is everything we do ultimately for ourselves?" | |
| ] | |
| }, | |
| { | |
| name: "Would You Rather", | |
| topics: [ | |
| "Would you rather never need sleep or never need to eat?", | |
| "Would you rather live 200 years in the past or 200 years in the future?", | |
| "Would you rather be the funniest person in the room or the smartest?", | |
| "Would you rather lose all your memories or never be able to make new ones?", | |
| "Would you rather always have to sing instead of speak or always have to dance instead of walk?", | |
| "Would you rather know how you're going to die or know exactly when?", | |
| "Would you rather be able to talk to animals or speak every human language fluently?", | |
| "Would you rather live in the mountains or on the beach?", | |
| "Would you rather be famous but broke or wealthy but unknown?", | |
| "Would you rather have the ability to read minds or predict the future?", | |
| "Would you rather give up your phone for a year or give up your car for a year?" | |
| ] | |
| } | |
| ]; | |
| let selectedTheme = null; | |
| let usedTopics = []; | |
| let availableTopics = []; | |
| let timerInterval = null; | |
| let seconds = 0; | |
| let isTimerRunning = false; | |
| // DOM elements | |
| const themeSelection = document.getElementById('themeSelection'); | |
| const sessionScreen = document.getElementById('sessionScreen'); | |
| const themeName = document.getElementById('themeName'); | |
| const topicDisplay = document.getElementById('topicDisplay'); | |
| const topicText = document.getElementById('topicText'); | |
| const timerSection = document.getElementById('timerSection'); | |
| const timerDisplay = document.getElementById('timerDisplay'); | |
| const nextSpeakerBtn = document.getElementById('nextSpeakerBtn'); | |
| const startSpeakingBtn = document.getElementById('startSpeakingBtn'); | |
| const resetBtn = document.getElementById('resetBtn'); | |
| const greenLight = document.getElementById('greenLight'); | |
| const yellowLight = document.getElementById('yellowLight'); | |
| const redLight = document.getElementById('redLight'); | |
| const completionMessage = document.getElementById('completionMessage'); | |
| // Theme selection | |
| document.querySelectorAll('.theme-card').forEach(card => { | |
| card.addEventListener('click', function() { | |
| const themeIndex = parseInt(this.dataset.theme); | |
| selectTheme(themeIndex); | |
| }); | |
| }); | |
| function selectTheme(themeIndex) { | |
| selectedTheme = themes[themeIndex]; | |
| availableTopics = [...selectedTheme.topics]; | |
| usedTopics = []; | |
| themeName.textContent = selectedTheme.name; | |
| themeSelection.classList.add('hidden'); | |
| sessionScreen.classList.remove('hidden'); | |
| topicDisplay.classList.add('hidden'); | |
| timerSection.classList.add('hidden'); | |
| startSpeakingBtn.classList.add('hidden'); | |
| completionMessage.classList.add('hidden'); | |
| nextSpeakerBtn.classList.remove('hidden'); | |
| nextSpeakerBtn.disabled = false; | |
| } | |
| // Next Speaker button | |
| nextSpeakerBtn.addEventListener('click', function() { | |
| if (availableTopics.length === 0) { | |
| completionMessage.classList.remove('hidden'); | |
| nextSpeakerBtn.disabled = true; | |
| return; | |
| } | |
| // Stop timer if running | |
| if (isTimerRunning) { | |
| stopTimer(); | |
| } | |
| // Get random unused topic | |
| const randomIndex = Math.floor(Math.random() * availableTopics.length); | |
| const topic = availableTopics[randomIndex]; | |
| // Move topic from available to used | |
| availableTopics.splice(randomIndex, 1); | |
| usedTopics.push(topic); | |
| // Display topic | |
| topicText.textContent = topic; | |
| topicDisplay.classList.remove('hidden'); | |
| timerSection.classList.add('hidden'); | |
| startSpeakingBtn.classList.remove('hidden'); | |
| nextSpeakerBtn.classList.add('hidden'); | |
| completionMessage.classList.add('hidden'); | |
| }); | |
| // Start Speaking button | |
| startSpeakingBtn.addEventListener('click', function() { | |
| startTimer(); | |
| timerSection.classList.remove('hidden'); | |
| startSpeakingBtn.classList.add('hidden'); | |
| nextSpeakerBtn.classList.remove('hidden'); | |
| }); | |
| // Reset button | |
| resetBtn.addEventListener('click', function() { | |
| stopTimer(); | |
| selectedTheme = null; | |
| usedTopics = []; | |
| availableTopics = []; | |
| sessionScreen.classList.add('hidden'); | |
| themeSelection.classList.remove('hidden'); | |
| topicDisplay.classList.add('hidden'); | |
| timerSection.classList.add('hidden'); | |
| startSpeakingBtn.classList.add('hidden'); | |
| completionMessage.classList.add('hidden'); | |
| nextSpeakerBtn.classList.remove('hidden'); | |
| nextSpeakerBtn.disabled = false; | |
| }); | |
| function startTimer() { | |
| seconds = 0; | |
| isTimerRunning = true; | |
| updateTimerDisplay(); | |
| resetLights(); | |
| timerInterval = setInterval(function() { | |
| seconds++; | |
| updateTimerDisplay(); | |
| updateLights(); | |
| }, 1000); | |
| } | |
| function stopTimer() { | |
| if (timerInterval) { | |
| clearInterval(timerInterval); | |
| timerInterval = null; | |
| } | |
| isTimerRunning = false; | |
| seconds = 0; | |
| updateTimerDisplay(); | |
| resetLights(); | |
| } | |
| function updateTimerDisplay() { | |
| const mins = Math.floor(seconds / 60); | |
| const secs = seconds % 60; | |
| timerDisplay.textContent = `${mins}:${secs.toString().padStart(2, '0')}`; | |
| } | |
| function updateLights() { | |
| // Green at 1:00 (60 seconds) | |
| if (seconds >= 60) { | |
| greenLight.classList.add('active'); | |
| } | |
| // Yellow at 1:30 (90 seconds) | |
| if (seconds >= 90) { | |
| yellowLight.classList.add('active'); | |
| } | |
| // Red at 2:00 (120 seconds) | |
| if (seconds >= 120) { | |
| redLight.classList.add('active'); | |
| } | |
| } | |
| function resetLights() { | |
| greenLight.classList.remove('active'); | |
| yellowLight.classList.remove('active'); | |
| redLight.classList.remove('active'); | |
| } | |
| </script> | |
| <!-- Creator Credit --> | |
| <div style="text-align: center; padding: 20px; color: rgba(255,255,255,0.8); font-size: 0.9em;"> | |
| App created by Ron Ruiz | |
| </div> | |
| </body> | |
| </html> |