diff --git a/index.html b/index.html index 3590a77a..b83bc22c 100644 --- a/index.html +++ b/index.html @@ -1,32 +1,32 @@ - + - - - - All-in-One Tools - - - -
-

All-in-One Tools

-

A collection of useful tools, all in one place.

-
+ + + + All-in-One Tools + + + +
+

All-in-One Tools

+

A collection of useful tools, all in one place.

+
-
-
-

Unit Converter

-

Convert between common units (length, weight, temperature).

- Open -
-
-

Calculator

-

Perform quick calculations.

- Open -
-
+
+
+

Unit Converter

+

Convert between common units (length, weight, temperature).

+ Open +
+
+

Calculator

+

Perform quick calculations.

+ Open +
+
- - - \ No newline at end of file + + + diff --git a/tools/converter.css b/tools/converter.css index 3c788ef6..41864270 100644 --- a/tools/converter.css +++ b/tools/converter.css @@ -4,7 +4,7 @@ background: white; padding: 1.5rem; border-radius: 12px; - box-shadow: 0 4px 8px rgba(0,0,0,0.1); + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } .converter-box { @@ -17,7 +17,7 @@ font-weight: bold; } -.converter-box input, +.converter-box input, .converter-box select { width: 100%; padding: 0.6rem; @@ -29,4 +29,4 @@ .converter-box h2 { text-align: center; color: #4f46e5; -} \ No newline at end of file +} diff --git a/tools/converter.html b/tools/converter.html index d8793614..155babcd 100644 --- a/tools/converter.html +++ b/tools/converter.html @@ -1,42 +1,42 @@ - + - - - - Unit Converter - - - - -
-

Unit Converter

- ← Back -
+ + + + Unit Converter + + + + +
+

Unit Converter

+ ← Back +
-
-
- - -
+
+
+ + +
-
- - -
+
+ + +
-
- -
+
+ +
-
-

Result: -

-
-
+
+

Result: -

+
+
- - - \ No newline at end of file + + + diff --git a/tools/converter.js b/tools/converter.js index 190bf1d2..5253b42a 100644 --- a/tools/converter.js +++ b/tools/converter.js @@ -17,21 +17,23 @@ convertBtn.addEventListener("click", () => { switch (type) { case "length": // meters <-> kilometers - result = value >= 1000 - ? `${(value / 1000).toFixed(2)} km` - : `${(value * 1000).toFixed(2)} m`; + result = + value >= 1000 + ? `${(value / 1000).toFixed(2)} km` + : `${(value * 1000).toFixed(2)} m`; break; case "weight": // kilograms <-> grams - result = value >= 1 - ? `${(value * 1000).toFixed(2)} g` - : `${(value / 1000).toFixed(2)} kg`; + result = + value >= 1 + ? `${(value * 1000).toFixed(2)} g` + : `${(value / 1000).toFixed(2)} kg`; break; case "temperature": // Celsius <-> Fahrenheit - result = `${value} °C = ${(value * 9/5 + 32).toFixed(2)} °F`; + result = `${value} °C = ${((value * 9) / 5 + 32).toFixed(2)} °F`; break; default: @@ -39,4 +41,4 @@ convertBtn.addEventListener("click", () => { } resultSpan.textContent = result; -}); \ No newline at end of file +});