Mercurial > personal > weather-server
annotate weather_server/templates/location.html @ 17:fdb874e0b270
graph: Update style and do HiDPI properly.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sat, 12 Oct 2019 20:40:11 -0400 |
parents | 9a609bcf0809 |
children | 9d07dc5c3340 |
rev | line source |
---|---|
1
f66df122f18d
get the skeleton of a webserver up?
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
1 <!doctype html> |
f66df122f18d
get the skeleton of a webserver up?
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
2 <html> |
f66df122f18d
get the skeleton of a webserver up?
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
3 <head> |
8
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
4 <title>{{ location.name }}</title> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
5 <meta name="viewport" content="width=device-width, initial-scale=1"> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
6 <link |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
7 rel="stylesheet" |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
8 href="{{ url_for('static', filename='style.css') }}"> |
1
f66df122f18d
get the skeleton of a webserver up?
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
9 </head> |
f66df122f18d
get the skeleton of a webserver up?
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
10 <body> |
8
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
11 <h1><span>{{ location.name }} conditions</span></h1> |
1
f66df122f18d
get the skeleton of a webserver up?
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
12 {% if last_reading %} |
13
4eaa9d69c4e2
Extremely basic version of the graph drawer.
Paul Fisher <paul@pfish.zone>
parents:
12
diff
changeset
|
13 <p class="plain important" id="temp"> |
8
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
14 <span class="key">Temperature</span> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
15 <span class="value"> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
16 <span class="pad"> </span> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
17 <span class="n"> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
18 {{- last_reading.temp_f|round|int -}} |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
19 </span> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
20 <span class="unit">°F</span> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
21 </span> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
22 </p> |
13
4eaa9d69c4e2
Extremely basic version of the graph drawer.
Paul Fisher <paul@pfish.zone>
parents:
12
diff
changeset
|
23 <p class="plain important" id="dewpoint"> |
8
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
24 <span class="key">Dew point</span> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
25 <span class="value"> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
26 <span class="pad"> </span> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
27 <span class="n"> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
28 {{- last_reading.dew_point_f|round|int -}} |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
29 </span> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
30 <span class="unit">°F</span> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
31 </span> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
32 </p> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
33 <p id="timestamp"> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
34 <span> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
35 <span class="key">Reported</span> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
36 <span class="value">{{ "{:%H:%M}".format(date) }}</span> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
37 </span> |
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
38 </p> |
1
f66df122f18d
get the skeleton of a webserver up?
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
39 {% else %} |
8
d54155a199d8
Improve template; add stylesheet.
Paul Fisher <paul@pfish.zone>
parents:
2
diff
changeset
|
40 <p id="big-question-mark">?</p> |
1
f66df122f18d
get the skeleton of a webserver up?
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
41 {% endif %} |
17
fdb874e0b270
graph: Update style and do HiDPI properly.
Paul Fisher <paul@pfish.zone>
parents:
16
diff
changeset
|
42 <!-- --> |
16
9a609bcf0809
Port main script to TypeScript and prepare for serving it.
Paul Fisher <paul@pfish.zone>
parents:
13
diff
changeset
|
43 <script src="{{ url_for('static', filename='amd/mad.js') }}"></script> |
9a609bcf0809
Port main script to TypeScript and prepare for serving it.
Paul Fisher <paul@pfish.zone>
parents:
13
diff
changeset
|
44 <script>new MADRegistry().install(self);</script> |
9a609bcf0809
Port main script to TypeScript and prepare for serving it.
Paul Fisher <paul@pfish.zone>
parents:
13
diff
changeset
|
45 <script src="{{ url_for('static', filename='graph.js') }}"></script> |
13
4eaa9d69c4e2
Extremely basic version of the graph drawer.
Paul Fisher <paul@pfish.zone>
parents:
12
diff
changeset
|
46 <script> |
16
9a609bcf0809
Port main script to TypeScript and prepare for serving it.
Paul Fisher <paul@pfish.zone>
parents:
13
diff
changeset
|
47 require('graph').setUp( |
13
4eaa9d69c4e2
Extremely basic version of the graph drawer.
Paul Fisher <paul@pfish.zone>
parents:
12
diff
changeset
|
48 document.getElementById('temp'), |
4eaa9d69c4e2
Extremely basic version of the graph drawer.
Paul Fisher <paul@pfish.zone>
parents:
12
diff
changeset
|
49 document.getElementById('dewpoint')); |
4eaa9d69c4e2
Extremely basic version of the graph drawer.
Paul Fisher <paul@pfish.zone>
parents:
12
diff
changeset
|
50 </script> |
16
9a609bcf0809
Port main script to TypeScript and prepare for serving it.
Paul Fisher <paul@pfish.zone>
parents:
13
diff
changeset
|
51 <!-- --> |
1
f66df122f18d
get the skeleton of a webserver up?
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
52 </body> |
f66df122f18d
get the skeleton of a webserver up?
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
53 </html> |