From fe453dacb2022c1b30b5c93dec62db231c920da8 Mon Sep 17 00:00:00 2001 From: Antoine Goutenoir Date: Wed, 27 Nov 2019 15:23:53 +0100 Subject: [PATCH] Improve output for small quantities of emitted CO2. --- flaskr/templates/estimation.html | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) diff --git a/flaskr/templates/estimation.html b/flaskr/templates/estimation.html index 42596fc..5ac3105 100644 --- a/flaskr/templates/estimation.html +++ b/flaskr/templates/estimation.html @@ -32,7 +32,11 @@ {% endif %} – + {% if city.footprint > 1000 %} {{ "%.1f" | format((city.footprint/1000.0) | round(1)) }} tons CO2EQ + {% else %} + {{ "%.1f" | format((city.footprint) | round(1)) }} kg CO2EQ + {% endif %} – {{ "%d" | format(city.distance | round() | int) }} km -- libgit2 0.21.2