Mercurial > personal > weather-server
annotate weather_server/templates/index.html @ 44:4ef6854446fe
Added tag v0.2.1 for changeset 1a69004d8e5a
| author | Paul Fisher <paul@pfish.zone> |
|---|---|
| date | Tue, 01 Apr 2025 16:29:14 -0400 |
| parents | 4af79d69b12e |
| children | d200755e0930 |
| rev | line source |
|---|---|
|
26
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
1 <!doctype html> |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
2 <html> |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
3 <head> |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
4 <title>The Weather In Places</title> |
|
27
99b0759386b1
index: Add meta-viewport declaration.
Paul Fisher <paul@pfish.zone>
parents:
26
diff
changeset
|
5 <meta name="viewport" content="width=device-width, initial-scale=1"> |
|
26
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
6 <link |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
7 rel="stylesheet" |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
8 href="{{ url_for('static', filename='style.css') }}"> |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
9 <link |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
10 rel="shortcut icon" |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
11 href="{{ url_for('static', filename='thermometer.png') }}"> |
| 29 | 12 <link rel="manifest" href="/static/manifest.webmanifest"> |
|
26
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
13 </head> |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
14 <body class="home"> |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
15 <h1><span>Weather</span></h1> |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
16 <ul> |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
17 {% for location in locations %} |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
18 <li> |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
19 <a href="{{ url_for('show', location=location.key) }}"> |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
20 <b>{{ location.name }}</b> |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
21 <span> |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
22 {%- set reading = location.latest() -%} |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
23 {%- if reading -%} |
|
41
4af79d69b12e
Use units better suited for science.
Paul Fisher <paul@pfish.zone>
parents:
36
diff
changeset
|
24 {{ reading.temp_k|int -}} |
|
4af79d69b12e
Use units better suited for science.
Paul Fisher <paul@pfish.zone>
parents:
36
diff
changeset
|
25 K |
|
26
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
26 {%- else -%} |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
27 ??? |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
28 {%- endif -%} |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
29 </span> |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
30 </a> |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
31 </li> |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
32 {% endfor %} |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
33 </ul> |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
34 </body> |
|
7def5611895b
Add support for an index page displaying all locations.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
35 </html> |
