From 121499717915a15f2e851a95121b1c569f2c6872 Mon Sep 17 00:00:00 2001 From: Vasily Davydov Date: Mon, 21 Sep 2026 15:46:12 +0300 Subject: [PATCH] add formulas --- index.html | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++++ style.css | 19 ++++++++ 2 files changed, 144 insertions(+) diff --git a/index.html b/index.html index 2546ae1..e7c654b 100644 --- a/index.html +++ b/index.html @@ -67,6 +67,8 @@ or the diesel price should be at least 0.00 €/L. + + @@ -80,6 +82,129 @@
+
+

Calculation Formulas

+ +

Break-Even Petrol Consumption:

+ + + + P + Cons + + = + + + 100 + × + ( + dTax + − + pTax + ) + + + annualKm + × + pPrice + + + + + + + dCons + × + dPrice + + pPrice + + + +

Minimum Diesel Price:

+ + + + dPrice + + = + + ( + pCons + − + + + 100 + × + taxDiff + + + annualKm + × + pPrice + + + ) + + × + + pPrice + dCons + + + +

Cost Calculation:

+ + + Diesel Cost + = + dTax + + + + ( + + + dPrice + × + dCons + + 100 + + × + annualKm + ) + + + + + Petrol Cost + = + pTax + + + + ( + + + pPrice + × + pCons + + 100 + + × + annualKm + ) + + + + + Difference + = + Petrol Cost + − + Diesel Cost + +
+ diff --git a/style.css b/style.css index 1be573c..2b7d558 100644 --- a/style.css +++ b/style.css @@ -159,6 +159,25 @@ th { margin-bottom: 10px; } +.formula-info { + background: var(--result-bg); + padding: 15px; + border-radius: 8px; + margin-top: 20px; + margin-bottom: 20px; + border-left: 5px solid var(--result-border); +} + +.formula-info h3 { + margin-top: 0; + color: var(--result-text); +} + +.formula-info p { + margin: 5px 0; + font-size: 0.9rem; +} + @media screen and (max-width: 768px) { .button-toggle { width: 25px;