An open API service indexing awesome lists of open source software.

https://github.com/lana-20/drink-water


https://github.com/lana-20/drink-water

Last synced: 8 months ago
JSON representation

Awesome Lists containing this project

README

          

| [Drink Water](https://github.com/lana-20/50_Projects_in_50_Days/tree/main/DrinkWater) | [Live Demo](https://lana-20.github.io/drink-water/) |
|----|----|

In this project, I am tracking cups of water, with a goal of 2 liters.
I used CSS to style and JavaScript to create functionality for the big cup and eight small cups.
If I click on the first small cup, the big cup shows 12.5% of the 2 liters filled up, with 1.75 liters remaining.
If I click on the fourth small cup, not only it highlights/get filled up, but also fills up all the way up to that cup.
And now I can see 50% of the 2 liters filled up, and 1 liter remaining. If I go to 100%, it fills up the entire big cup.
It's a nice project to practice manipulation of the DOM and do a bit of calculation in the JavaScript.