owm.py: check for w['rain']['3h']
[chrisu/seepark.git] / web / templates / seepark_web.html
1 <!DOCTYPE html>
2 <html lang="de">
3         <head>
4                 <title>Seepark Obsteig</title>
5
6                 <!-- mobile first, yeah -->
7                 <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
9                 <!-- don't cache; refresh -->
10                 <meta http-equiv="Pragma" content="no-cache" />
11                 <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
12                 <meta http-equiv="Expires" content="0" />
13
14                 <!-- Load c3.css -->
15                 <link href="{{url_for('static', filename='c3.min.css')}}" rel="stylesheet">
16
17                 <!-- Load own css -->
18                 <link href="{{url_for('static', filename='seepark_web.css')}}" rel="stylesheet">
19
20                 <!-- Load d3.js and c3.js, and strftime.js -->
21                 <script src="{{url_for('static', filename='d3.min.js')}}" charset="utf-8"></script>
22                 <script src="{{url_for('static', filename='c3.min.js')}}"></script>
23                 <script src="{{url_for('static', filename='strftime-min.js')}}"></script>
24
25                 <!-- Load owm script -->
26                 <script async="true" charset="utf-8" src="//openweathermap.org/themes/openweathermap/assets/vendor/owm/js/weather-widget-generator.js"></script>
27         </head>
28         <body>
29                 <h1>Daten zum Seepark Obsteig</h1>
30                 <h2>Aktuelle Werte</h2>
31                 <div id="current">
32                 <p id="currentair">
33                         {% if airvalue is none %}
34                         <strong>Luft: N/A</strong>
35                         {% else %}
36                         <strong>Luft: <span id="currentairvalue">{{ airvalue|round(1) }}</span>°C</strong><br />
37                         <small>(<span id="currentairtime">{{ airtime.strftime('%Y-%m-%d %H:%M') }}</span>)</small>
38                         {% endif %}
39                 </p>
40                 <p id="currentwater">
41                         <strong>Wasser: <span id="currentwatervalue">{{ watervalue|round(1) }}</span>°C</strong><br />
42                         <small>(<span id="currentwatertime">{{ watertime.strftime('%Y-%m-%d %H:%M') }}</span>)</small>
43                 </p>
44                 </div>
45
46                 <h2>Der See</h2>
47                 <div id="chart_water_1"   class="c3-container"></div>
48                 <div id="chart_water_7"   class="c3-container"></div>
49                 <div id="chart_water_31"  class="c3-container"></div>
50                 <div id="chart_water_365" class="c3-container"></div>
51
52                 <h2>Die Luft</h2>
53                 <div id="chart_air_1"   class="c3-container"></div>
54                 <div id="chart_air_7"   class="c3-container"></div>
55                 <div id="chart_air_31"  class="c3-container"></div>
56                 <div id="chart_air_365" class="c3-container"></div>
57
58                 <!-- openweathermap widget -->
59                 <div id="openweathermap-widget-15"></div>
60                 <script>
61                 window.myWidgetParam ? window.myWidgetParam : window.myWidgetParam = [];
62                 window.myWidgetParam.push({
63                         id: 15,
64                         cityid: '3319578',
65                         appid: '{{ apikey }}',
66                         units: 'metric',
67                         containerid: 'openweathermap-widget-15',
68                         lang: 'de',
69                 });
70                 </script>
71
72                 <!-- windy widget -->
73                 <div id="windy">
74                 <iframe id="windyiframe" width="650" height="450" src="https://embed.windy.com/embed2.html?lat=47.297&amp;lon=10.927&amp;zoom=10&amp;level=surface&amp;overlay=rain&amp;menu=&amp;message=&amp;marker=&amp;calendar=&amp;pressure=&amp;type=map&amp;location=coordinates&amp;detail=&amp;detailLat=48.200&amp;detailLon=16.350&amp;metricWind=default&amp;metricTemp=default&amp;radarRange=-1" frameborder="0"></iframe> 
75                 </div>
76
77                 <hr />
78                 <p><small><a href="https://git.toastfreeware.priv.at/chrisu/seepark.git">Source code</a>, <a href="{{url_for('static', filename='doc/index.html')}}">API documentation</a>, Report for <a href="{{url_for('report', year=last_month.year, month=last_month.month)}}">previous month</a>/<a href="{{url_for('report', year=this_month.year, month=this_month.month)}}">current month</a></small></p>
79
80                 <!-- Load own javascript code -->
81                 <script src="{{url_for('static', filename='seepark_web.js')}}"></script>
82
83         </body>
84 </html>