source code beautification
[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                 <!-- here the owm script will be appended -->
24
25                 <title>Seepark Obsteig</title>
26         </head>
27         <body>
28                 <h1>Daten zum Seepark Obsteig</h1>
29                 <h2>Aktuelle Werte</h2>
30                 <div id="current">
31                 <p id="currentair">
32                         {% if airvalue is none %}
33                         <strong>Luft: N/A</strong>
34                         {% else %}
35                         <strong>Luft: <span id="currentairvalue">{{ airvalue|round(1) }}</span>°C</strong><br />
36                         <small>(<span id="currentairtime">{{ airtime.strftime('%Y-%m-%d %H:%M') }}</span>)</small>
37                         {% endif %}
38                 </p>
39                 <p id="currentwater">
40                         <strong>Wasser: <span id="currentwatervalue">{{ watervalue|round(1) }}</span>°C</strong><br />
41                         <small>(<span id="currentwatertime">{{ watertime.strftime('%Y-%m-%d %H:%M') }}</span>)</small>
42                 </p>
43                 </div>
44
45                 <h2>Der See</h2>
46                 <div id="chart_water_1"></div>
47                 <div id="chart_water_7"></div>
48                 <div id="chart_water_31"></div>
49                 <div id="chart_water_365"></div>
50
51                 <h2>Die Luft</h2>
52                 <div id="chart_air_1"></div>
53                 <div id="chart_air_7"></div>
54                 <div id="chart_air_31"></div>
55                 <div id="chart_air_365"></div>
56
57                 <!-- openweathermap widget -->
58                 <div id="openweathermap-widget-15"></div>
59                 <script>
60                 window.myWidgetParam ? window.myWidgetParam : window.myWidgetParam = [];
61                 window.myWidgetParam.push({
62                         id: 15,
63                         cityid: '3319578',
64                         appid: '{{ apikey }}',
65                         units: 'metric',
66                         containerid: 'openweathermap-widget-15',
67                         lang: 'de',
68                 });
69                 (function() {
70                         var script = document.createElement('script');
71                         script.async = true;
72                         script.charset = "utf-8";
73                         script.src = "//openweathermap.org/themes/openweathermap/assets/vendor/owm/js/weather-widget-generator.js";
74                         var s = document.getElementsByTagName('title')[0];
75                         s.parentNode.insertBefore(script, s);
76                 })();
77                 </script>
78
79                 <!-- windy widget -->
80                 <div id="windy">
81                 <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> 
82                 </div>
83
84                 <hr />
85                 <p><small><a href="https://git.toastfreeware.priv.at/chrisu/seepark.git">Source code</a></small></p>
86                 
87                 <!-- Load own javascript code -->
88                 <script src="{{url_for('static', filename='seepark_web.js')}}"></script>
89
90         </body>
91 </html>