]> ToastFreeware Gitweb - chrisu/seepark.git/blob - web/templates/seepark_web.html
html+js: rename stuff to prepare for weather
[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" />
10                 <meta http-equiv="Refresh" content="300" />
11
12                 <!-- Load c3.css -->
13                 <link href="{{url_for('static', filename='c3.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 -->
19                 <script src="{{url_for('static', filename='d3.js')}}" charset="utf-8"></script>
20                 <script src="{{url_for('static', filename='c3.js')}}"></script>
21
22                 <title>Seepark Obsteig</title>
23         </head>
24         <body>
25                 <h1>Daten zum Seepark Obsteig</h1>
26                 <h2>Aktuelle Werte</h2>
27                 <div id="current">
28                 <p id="currentair">
29                         {% if airvalue is none %}
30                         <strong>Luft: N/A</strong>
31                         {% else %}
32                         <strong>Luft: {{ airvalue|round(1) }}°C</strong><br />
33                         <small>({{ airtime.strftime('%Y-%m-%d %H:%M') }})</small>
34                         {% endif %}
35                 </p>
36                 <p id="currentwater">
37                         <strong>Wasser: {{ watervalue|round(1) }}°C</strong><br />
38                         <small>({{ watertime.strftime('%Y-%m-%d %H:%M') }})</small>
39                 </p>
40                 </div>
41
42                 <h2>Der See</h2>
43                 <div id="chart_water_1"></div>
44                 <div id="chart_water_7"></div>
45                 <div id="chart_water_31"></div>
46                 <div id="chart_water_365"></div>
47
48
49                 <!-- openweathermap widget -->
50                 <div id="openweathermap-widget-15"></div>
51                 <script>
52                 window.myWidgetParam ? window.myWidgetParam : window.myWidgetParam = [];
53                 window.myWidgetParam.push({
54                         id: 15,
55                         cityid: '3319578',
56                         appid: '{{ apikey }}',
57                         units: 'metric',
58                         containerid: 'openweathermap-widget-15',
59                         lang: 'de',
60                 });
61                 (function() {
62                         var script = document.createElement('script');
63                         script.async = true;
64                         script.charset = "utf-8";
65                         script.src = "//openweathermap.org/themes/openweathermap/assets/vendor/owm/js/weather-widget-generator.js";
66                         var s = document.getElementsByTagName('script')[0];
67                         s.parentNode.insertBefore(script, s);
68                 })();
69                 </script>
70
71                 <!-- Load own javascript code -->
72                 <script src="{{url_for('static', filename='seepark_web.js')}}"></script>
73
74         </body>
75 </html>