comparison weather_server/templates/index.html @ 36:e5a03d63b3d9 default tip

Truncate, don’t round, temperatures displayed in HTML.
author Paul Fisher <paul@pfish.zone>
date Fri, 02 Jul 2021 20:38:11 -0400
parents 27217790dc04
children
comparison
equal deleted inserted replaced
35:2f3473416c11 36:e5a03d63b3d9
19 <a href="{{ url_for('show', location=location.key) }}"> 19 <a href="{{ url_for('show', location=location.key) }}">
20 <b>{{ location.name }}</b> 20 <b>{{ location.name }}</b>
21 <span> 21 <span>
22 {%- set reading = location.latest() -%} 22 {%- set reading = location.latest() -%}
23 {%- if reading -%} 23 {%- if reading -%}
24 {{ reading.temp_f|round|int -}} 24 {{ reading.temp_f|int -}}
25 &nbsp;°F 25 &nbsp;°F
26 {%- else -%} 26 {%- else -%}
27 ??? 27 ???
28 {%- endif -%} 28 {%- endif -%}
29 </span> 29 </span>