Mercurial > personal > weather-server
comparison weather_server/templates/location.html @ 19:47987502bf4c
Add graph, make it public, and bump the version.
This checks in the tsc-compiled JS files because idklol.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sun, 13 Oct 2019 18:22:06 -0400 |
parents | 9d07dc5c3340 |
children | a7fe635d1c88 |
comparison
equal
deleted
inserted
replaced
18:9d07dc5c3340 | 19:47987502bf4c |
---|---|
5 <meta name="viewport" content="width=device-width, initial-scale=1"> | 5 <meta name="viewport" content="width=device-width, initial-scale=1"> |
6 <link | 6 <link |
7 rel="stylesheet" | 7 rel="stylesheet" |
8 href="{{ url_for('static', filename='style.css') }}"> | 8 href="{{ url_for('static', filename='style.css') }}"> |
9 </head> | 9 </head> |
10 <body> | 10 <body class="plain"> |
11 <h1><span>{{ location.name }} conditions</span></h1> | 11 <h1><span>{{ location.name }} conditions</span></h1> |
12 {% if last_reading %} | 12 {% if last_reading %} |
13 <p class="plain important" id="temp"> | 13 <p class="important" id="temp"> |
14 <span class="key">Temperature</span> | 14 <span class="key">Temperature</span> |
15 <span class="value"> | 15 <span class="value"> |
16 <span class="pad"> </span> | 16 <span class="pad"> </span> |
17 <span class="n"> | 17 <span class="n"> |
18 {{- last_reading.temp_f|round|int -}} | 18 {{- last_reading.temp_f|round|int -}} |
19 </span> | 19 </span> |
20 <span class="unit">°F</span> | 20 <span class="unit">°F</span> |
21 </span> | 21 </span> |
22 </p> | 22 </p> |
23 <p class="plain important" id="dewpoint"> | 23 <p class="important" id="dewpoint"> |
24 <span class="key">Dew point</span> | 24 <span class="key">Dew point</span> |
25 <span class="value"> | 25 <span class="value"> |
26 <span class="pad"> </span> | 26 <span class="pad"> </span> |
27 <span class="n"> | 27 <span class="n"> |
28 {{- last_reading.dew_point_f|round|int -}} | 28 {{- last_reading.dew_point_f|round|int -}} |
37 </span> | 37 </span> |
38 </p> | 38 </p> |
39 {% else %} | 39 {% else %} |
40 <p id="big-question-mark">?</p> | 40 <p id="big-question-mark">?</p> |
41 {% endif %} | 41 {% endif %} |
42 <!-- | 42 <script src="{{ url_for('static', filename='amd/mad.js') }}"></script> |
43 <script src="{{ url_for('static', filename='amd/mad.js') }}"></script> | 43 <script>new MADRegistry().install(self);</script> |
44 <script>new MADRegistry().install(self);</script> | 44 <script src="{{ url_for('static', filename='graph.js') }}"></script> |
45 <script src="{{ url_for('static', filename='graph.js') }}"></script> | 45 <script> |
46 <script> | 46 require('graph').setUp( |
47 require('graph').setUp( | 47 document.body, |
48 document.getElementById('temp'), | 48 document.getElementById('temp'), |
49 document.getElementById('dewpoint')); | 49 document.getElementById('dewpoint')); |
50 </script> | 50 </script> |
51 <!-- --> | |
52 </body> | 51 </body> |
53 </html> | 52 </html> |