A BMI Calculator, what's more?
BMI-Calc is made by NaiNonTheN00b1 as a small webapp project which, well basically, calculates your BMI from your input weight and height. It also supports two popular (and only existing) units: Imperial and Metric.
For dark theme-rs, this BMI calculator also comes with auto dark mode supports as well :).
To briefly explain, the site calculates your BMI from your input value, which will first check if it is valid — no characters or symbols aside from dot (.). If the value is valid, it will use the imported value to calculate the BMI with the following formula:
Weight (kg) / Height (m) ^ 2
Once finished, it will create an element that displays your BMI, both shortened and full on hover.
Although this BMI calculator supports the Imperial unit, it will eventually be converted to the Metric unit. This is for two reasons:
- To fully support the Imperial unit without converting, I need to code another formula, which I'm too lazy to do so. (lol)
- Even though I did code the formula for the Imperial unit, you won't be able to use units crossing each other, such as using Weight as kg, and height as ft.
This calculator also supports auto themes, including dark themes by adding a class, style with the dark color scheme. It uses Local Storage to save your theme preference.
My code is free to use. You can use them for anything you'd like.
Suggestions are always welcome. I'm looking for any flaws to fix to better my web development skill (++ front-end). :D