A productivity tool built using HTML, CSS, and JavaScript to help manage work and break intervals using the Pomodoro Technique.
<!-- Timer HTML Structure -->
<div class="timer">
<div id="time">00:00</div>
<button onclick="startTimer()">Start</button>
<button onclick="pauseTimer()">Pause</button>
<button onclick="resetTimer()">Reset</button>
</div>
// Timer Logic Example
let time = 25 * 60; // 25 minutes
function startTimer() {
setInterval(() => {
time--;
document.getElementById('time').innerText = formatTime(time);
}, 1000);
}
function formatTime(seconds) {
const mins = Math.floor(seconds / 60);
const secs = seconds % 60;
return `${mins}:${secs < 10 ? '0' : ''}${secs}`;
}