Countdown Timer Integration in the Pomodoro App
The final step of the Pomodoro App: Add a timer to the selected task.
Exercise:
Create a form displaying a timer counting down from 25
minutes in the format of mm:ss
. Display the name of the task above the timer. Once the timer reaches 00:00
, revert to 25:00
, increase the pomodoro count by 1
, and continue counting down.
Place three links below the timer: Start
, Pause
, and Reset
.
When a card is selected, 25:00
appears on the timer, and the timer stops. You can start the timer by clicking the Start
link. When the Pause
link is clicked, the timer is suspended, keeping its current value. Reset
moves the timer back to 25:00
.
Source code: Use the PomodoroTracker8 folder as a starting point. The result is in PomodoroTracker9.
Solution: We are in the finish line with the Pomodoro App. We only need a timer.
First, let’s integrate a static timer in the app that stays visible even if we scroll. This is an HTML/CSS task. Add this markup to the index.html
file:
Get hands-on with 1400+ tech skills courses.