Stopwatch and countdown - Nacho Blanco #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As a senior frontend developer, I want to develop a web tool that could provide a stopwatch and a countdown in the same tool.
The technologies to use should be javascript and using tailwind CSS as CDN for style management.
I want to use best practices.
The web tool is composed by two different files:
index.html: On this file I should have the interface. On this interface we will have two different buttons on center.
The first button says: "Stopwatch". The second button, positioned at its right, says: "Countdown".
Stopwatch view: When the "stopwatch" button been clicked, it should be shown a chronometer with decimals on center with two buttons
bellow it for clear and start the chronometer. The "clear" button should reset the chronometer.
The "start" button should start to count the chronometer from the previous value.
At the bottom of the two buttons, we will have a entire row with blue background with one button that says "Back".
This button should go back to the previous view.
Countdown view: When this button has been clicked, it should be shown a chronometer with decimals on center with the same design than the attached file.
Bellow of the chronometer, we will have ten buttons with green color.
This buttons should print numbers from 0 to 9 separated in two rows.
After the last button of the first row, we should have a green button that print: "Set".
At final of the last button in second row, we should have another button exactly bellow of the button "Set" that says: "Clear".
The "set" button should set the chronometer above it with the number selected. After, this chronometer should bo back like a countdown.
The "clear" button should reset the countdown.
script.js. On this file we should have all frontend logic already described separated by components.
This logic should developed using best practices.