Commit fe453dacb2022c1b30b5c93dec62db231c920da8

Authored by Antoine Goutenoir
1 parent 388aa926
Exists in master

Improve output for small quantities of emitted CO2.

(it was much simpler than expected)
Showing 1 changed file with 4 additions and 0 deletions   Show diff stats
flaskr/templates/estimation.html
... ... @@ -32,7 +32,11 @@
32 32 {% endif %}
33 33 </span>
34 34
  35 + {% if city.footprint > 1000 %}
35 36 {{ "%.1f" | format((city.footprint/1000.0) | round(1)) }} tons CO<sub>2</sub><small>EQ</small>
  37 + {% else %}
  38 + {{ "%.1f" | format((city.footprint) | round(1)) }} kg CO<sub>2</sub><small>EQ</small>
  39 + {% endif %}
36 40
37 41 {{ "%d" | format(city.distance | round() | int) }} km
38 42 </li>
... ...