comparison weather_server/templates/location.html @ 8:d54155a199d8

Improve template; add stylesheet.
author Paul Fisher <paul@pfish.zone>
date Sun, 29 Sep 2019 20:32:48 -0400
parents cda47993a193
children 9e6289598d8c
comparison
equal deleted inserted replaced
7:4c25d5bb3534 8:d54155a199d8
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Weather for {{ location.name }}</title> 4 <title>{{ location.name }}</title>
5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <link
7 rel="stylesheet"
8 href="{{ url_for('static', filename='style.css') }}">
5 </head> 9 </head>
6 <body> 10 <body>
11 <h1><span>{{ location.name }} conditions</span></h1>
7 {% if last_reading %} 12 {% if last_reading %}
8 Temperature: {{ last_reading.temp_f }}<br> 13 <p class="important" id="temp">
9 Dew point: {{ last_reading.dew_point_f }}<br> 14 <span class="key">Temperature</span>
10 As of: {{ date }} 15 <span class="value">
16 <span class="pad"> </span>
17 <span class="n">
18 {{- last_reading.temp_f|round|int -}}
19 </span>
20 <span class="unit">&deg;F</span>
21 </span>
22 </p>
23 <p class="important" id="dewpoint">
24 <span class="key">Dew point</span>
25 <span class="value">
26 <span class="pad"> </span>
27 <span class="n">
28 {{- last_reading.dew_point_f|round|int -}}
29 </span>
30 <span class="unit">&deg;F</span>
31 </span>
32 </p>
33 <p id="timestamp">
34 <span>
35 <span class="key">Reported</span>
36 <span class="value">{{ "{:%H:%M}".format(date) }}</span>
37 </span>
38 </p>
11 {% else %} 39 {% else %}
12 No weather yet 40 <p id="big-question-mark">?</p>
13 {% endif %} 41 {% endif %}
14 </body> 42 </body>
15 </html> 43 </html>