Download index.html from FaxMe/chronostacks-multi-timer-madness: direct link, hf CLI and curl.
- Browser
- Download file 10.4 kB
-
https://huggingface.co/spaces/FaxMe/chronostacks-multi-timer-madness/resolve/main/index.html
- Command line
-
hf download hf://spaces/FaxMe/chronostacks-multi-timer-madness/index.html
-
curl -L -o index.html https://huggingface.co/spaces/FaxMe/chronostacks-multi-timer-madness/resolve/main/index.html
10.4 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>ChronoStacks - Multi-Timer</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <style> | |
| body { | |
| background: linear-gradient(135deg, #1a1a1a, #2c3e50); | |
| min-height: 100vh; | |
| } | |
| .timer-container { | |
| background: rgba(30, 30, 30, 0.8); | |
| backdrop-filter: blur(10px); | |
| border: 1px solid rgba(255, 255, 255, 0.1); | |
| } | |
| .timer-display { | |
| font-family: 'Courier New', monospace; | |
| text-shadow: 0 0 10px rgba(255, 255, 255, 0.3); | |
| } | |
| input[type="time"]::-webkit-calendar-picker-indicator { | |
| filter: invert(1); | |
| } | |
| </style> | |
| </head> | |
| <body class="text-white"> | |
| <div class="container mx-auto px-4 py-8 max-w-4xl"> | |
| <header class="text-center mb-12"> | |
| <h1 class="text-4xl font-bold mb-2 bg-clip-text text-transparent bg-gradient-to-r from-white to-gray-300">Multi Timer</h1> | |
| <p class="text-gray-400">Simple countdown timers</p> | |
| </header> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> | |
| <!-- Timer 1 --> | |
| <div class="timer-container p-6 rounded-xl shadow-lg"> | |
| <div class="mb-4"> | |
| <input type="text" placeholder="Timer Title" class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"> | |
| </div> | |
| <div class="timer-display text-5xl font-bold text-center mb-6">00:00</div> | |
| <div class="flex items-center justify-center space-x-4 mb-4"> | |
| <input type="time" class="bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" step="1"> | |
| </div> | |
| <div class="flex justify-center space-x-4"> | |
| <button class="timer-start bg-green-600 hover:bg-green-700 px-6 py-2 rounded-lg font-medium transition">Start</button> | |
| <button class="timer-pause bg-yellow-600 hover:bg-yellow-700 px-6 py-2 rounded-lg font-medium transition hidden">Pause</button> | |
| <button class="timer-reset bg-red-600 hover:bg-red-700 px-6 py-2 rounded-lg font-medium transition">Reset</button> | |
| </div> | |
| </div> | |
| <!-- Timer 2 --> | |
| <div class="timer-container p-6 rounded-xl shadow-lg"> | |
| <div class="mb-4"> | |
| <input type="text" placeholder="Timer Title" class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"> | |
| </div> | |
| <div class="timer-display text-5xl font-bold text-center mb-6">00:00:00</div> | |
| <div class="flex items-center justify-center space-x-4 mb-4"> | |
| <input type="time" class="bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" step="1"> | |
| </div> | |
| <div class="flex justify-center space-x-4"> | |
| <button class="timer-start bg-green-600 hover:bg-green-700 px-6 py-2 rounded-lg font-medium transition">Start</button> | |
| <button class="timer-pause bg-yellow-600 hover:bg-yellow-700 px-6 py-2 rounded-lg font-medium transition hidden">Pause</button> | |
| <button class="timer-reset bg-red-600 hover:bg-red-700 px-6 py-2 rounded-lg font-medium transition">Reset</button> | |
| </div> | |
| </div> | |
| <!-- Timer 3 --> | |
| <div class="timer-container p-6 rounded-xl shadow-lg"> | |
| <div class="mb-4"> | |
| <input type="text" placeholder="Timer Title" class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"> | |
| </div> | |
| <div class="timer-display text-5xl font-bold text-center mb-6">00:00:00</div> | |
| <div class="flex items-center justify-center space-x-4 mb-4"> | |
| <input type="time" class="bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" step="1"> | |
| </div> | |
| <div class="flex justify-center space-x-4"> | |
| <button class="timer-start bg-green-600 hover:bg-green-700 px-6 py-2 rounded-lg font-medium transition">Start</button> | |
| <button class="timer-pause bg-yellow-600 hover:bg-yellow-700 px-6 py-2 rounded-lg font-medium transition hidden">Pause</button> | |
| <button class="timer-reset bg-red-600 hover:bg-red-700 px-6 py-2 rounded-lg font-medium transition">Reset</button> | |
| </div> | |
| </div> | |
| <!-- Timer 4 --> | |
| <div class="timer-container p-6 rounded-xl shadow-lg"> | |
| <div class="mb-4"> | |
| <input type="text" placeholder="Timer Title" class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"> | |
| </div> | |
| <div class="timer-display text-5xl font-bold text-center mb-6">00:00:00</div> | |
| <div class="flex items-center justify-center space-x-4 mb-4"> | |
| <input type="time" class="bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" step="1"> | |
| </div> | |
| <div class="flex justify-center space-x-4"> | |
| <button class="timer-start bg-green-600 hover:bg-green-700 px-6 py-2 rounded-lg font-medium transition">Start</button> | |
| <button class="timer-pause bg-yellow-600 hover:bg-yellow-700 px-6 py-2 rounded-lg font-medium transition hidden">Pause</button> | |
| <button class="timer-reset bg-red-600 hover:bg-red-700 px-6 py-2 rounded-lg font-medium transition">Reset</button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', () => { | |
| feather.replace(); | |
| // Initialize all timers | |
| const timers = document.querySelectorAll('.timer-container'); | |
| timers.forEach((timer, index) => { | |
| const display = timer.querySelector('.timer-display'); | |
| const startBtn = timer.querySelector('.timer-start'); | |
| const pauseBtn = timer.querySelector('.timer-pause'); | |
| const resetBtn = timer.querySelector('.timer-reset'); | |
| const timeInput = timer.querySelector('input[type="time"]'); | |
| const titleInput = timer.querySelector('input[type="text"]'); | |
| let countdown; | |
| let totalSeconds = 0; | |
| let isRunning = false; | |
| // Format time to MM:SS | |
| function formatTime(seconds) { | |
| const minutes = Math.floor(seconds / 60); | |
| const secs = seconds % 60; | |
| return [ | |
| minutes.toString().padStart(2, '0'), | |
| secs.toString().padStart(2, '0') | |
| ].join(':'); | |
| } | |
| // Start timer | |
| startBtn.addEventListener('click', () => { | |
| if (isRunning) return; | |
| // Parse time input | |
| const timeValue = timeInput.value || '00:00'; | |
| const [minutes, seconds] = timeValue.split(':').map(Number); | |
| totalSeconds = minutes * 60 + seconds; | |
| if (totalSeconds <= 0) { | |
| alert('Please enter a valid time'); | |
| return; | |
| } | |
| display.textContent = formatTime(totalSeconds); | |
| // Start countdown | |
| countdown = setInterval(() => { | |
| if (totalSeconds <= 0) { | |
| clearInterval(countdown); | |
| isRunning = false; | |
| startBtn.classList.remove('hidden'); | |
| pauseBtn.classList.add('hidden'); | |
| // Play sound when timer ends | |
| const audio = new Audio('https://assets.mixkit.co/sfx/preview/mixkit-alarm-digital-clock-beep-989.mp3'); | |
| audio.play(); | |
| return; | |
| } | |
| totalSeconds--; | |
| display.textContent = formatTime(totalSeconds); | |
| }, 1000); | |
| isRunning = true; | |
| startBtn.classList.add('hidden'); | |
| pauseBtn.classList.remove('hidden'); | |
| }); | |
| // Pause timer | |
| pauseBtn.addEventListener('click', () => { | |
| clearInterval(countdown); | |
| isRunning = false; | |
| startBtn.classList.remove('hidden'); | |
| pauseBtn.classList.add('hidden'); | |
| }); | |
| // Reset timer | |
| resetBtn.addEventListener('click', () => { | |
| clearInterval(countdown); | |
| isRunning = false; | |
| totalSeconds = 0; | |
| display.textContent = '00:00'; | |
| timeInput.value = ''; | |
| startBtn.classList.remove('hidden'); | |
| pauseBtn.classList.add('hidden'); | |
| }); | |
| // Update display when time input changes | |
| timeInput.addEventListener('change', () => { | |
| const timeValue = timeInput.value || '00:00'; | |
| const [minutes, seconds] = timeValue.split(':').map(Number); | |
| totalSeconds = minutes * 60 + seconds; | |
| display.textContent = formatTime(totalSeconds); | |
| }); | |
| }); | |
| }); | |
| </script> | |
| </body> | |
| </html> | |