3f29501be7ee50ea198ceabbeb10e8e442062dec
[chrisu/seepark.git] / web / templates / seepark_web.html
1 <!DOCTYPE html>
2 <html lang="de">
3         <head>
4                 <!-- mobile first, yeah -->
5                 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
7                 <!-- don't cache; refresh -->
8                 <meta http-equiv="Pragma" content="no-cache" />
9                 <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
10                 <meta http-equiv="Expires" content="0" />
11
12                 <!-- Load c3.css -->
13                 <link href="{{url_for('static', filename='c3.min.css')}}" rel="stylesheet">
14
15                 <!-- Load own css -->
16                 <link href="{{url_for('static', filename='seepark_web.css')}}" rel="stylesheet">
17
18                 <!-- Load d3.js and c3.js, and strftime.js -->
19                 <script src="{{url_for('static', filename='d3.min.js')}}" charset="utf-8"></script>
20                 <script src="{{url_for('static', filename='c3.min.js')}}"></script>
21                 <script src="{{url_for('static', filename='strftime-min.js')}}"></script>
22
23                 <title>Seepark Obsteig</title>
24         </head>
25         <body>
26                 <h1>Daten zum Seepark Obsteig</h1>
27                 <h2>Aktuelle Werte</h2>
28                 <div id="current">
29                 <p id="currentair">
30                         {% if airvalue is none %}
31                         <strong>Luft: N/A</strong>
32                         {% else %}
33                         <strong>Luft: <span id="currentairvalue">{{ airvalue|round(1) }}</span>°C</strong><br />
34                         <small>(<span id="currentairtime">{{ airtime.strftime('%Y-%m-%d %H:%M') }}</span>)</small>
35                         {% endif %}
36                 </p>
37                 <p id="currentwater">
38                         <strong>Wasser: <span id="currentwatervalue">{{ watervalue|round(1) }}</span>°C</strong><br />
39                         <small>(<span id="currentwatertime">{{ watertime.strftime('%Y-%m-%d %H:%M') }}</span>)</small>
40                 </p>
41                 </div>
42
43                 <h2>Der See</h2>
44                 <div id="chart_water_1"></div>
45                 <div id="chart_water_7"></div>
46                 <div id="chart_water_31"></div>
47                 <div id="chart_water_365"></div>
48
49                 <h2>Die Luft</h2>
50                 <div id="chart_air_1"></div>
51                 <div id="chart_air_7"></div>
52                 <div id="chart_air_31"></div>
53                 <div id="chart_air_365"></div>
54
55                 <!-- openweathermap widget -->
56                 <div id="openweathermap-widget-15"></div>
57                 <script>
58                 window.myWidgetParam ? window.myWidgetParam : window.myWidgetParam = [];
59                 window.myWidgetParam.push({
60                         id: 15,
61                         cityid: '3319578',
62                         appid: '{{ apikey }}',
63                         units: 'metric',
64                         containerid: 'openweathermap-widget-15',
65                         lang: 'de',
66                 });
67                 (function() {
68                         var script = document.createElement('script');
69                         script.async = true;
70                         script.charset = "utf-8";
71                         script.src = "//openweathermap.org/themes/openweathermap/assets/vendor/owm/js/weather-widget-generator.js";
72                         var s = document.getElementsByTagName('script')[0];
73                         s.parentNode.insertBefore(script, s);
74                 })();
75                 </script>
76
77                 <!-- windy widget -->
78                 <div id="windy">
79                 <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> 
80                 </div>
81
82                 <hr />
83                 <p><small><a href="https://git.toastfreeware.priv.at/chrisu/seepark.git">Source code</a></small></p>
84                 
85                 <!-- Load own javascript code -->
86                 <script src="{{url_for('static', filename='seepark_web.js')}}"></script>
87
88         </body>
89 </html>