]> ToastFreeware Gitweb - chrisu/seepark.git/blobdiff - web/templates/seepark_web.html
add link to source code in html template
[chrisu/seepark.git] / web / templates / seepark_web.html
index aabd1df480a520ff35f0d517424f2c567f901aea..74ccf575edbebd171dc14f472e94226dd8ee7f55 100644 (file)
@@ -1,8 +1,15 @@
 <!DOCTYPE html>
 <html lang="de">
        <head>
+               <!-- mobile first, yeah -->
                <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
+               <!-- don't cache; refresh -->
+               <meta http-equiv="Pragma" content="no-cache" />
+               <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+               <meta http-equiv="Expires" content="0" />
+               <meta http-equiv="Refresh" content="300" />
+
                <!-- Load c3.css -->
                <link href="{{url_for('static', filename='c3.css')}}" rel="stylesheet">
 
                <h2>Aktuelle Werte</h2>
                <div id="current">
                <p id="currentair">
-                       <strong>Luft: {{ airvalue }}°C</strong><br />
-                       <small>({{ airtime }})</small>
+                       {% if airvalue is none %}
+                       <strong>Luft: N/A</strong>
+                       {% else %}
+                       <strong>Luft: {{ airvalue|round(1) }}°C</strong><br />
+                       <small>({{ airtime.strftime('%Y-%m-%d %H:%M') }})</small>
+                       {% endif %}
                </p>
                <p id="currentwater">
-                       <strong>Wasser: {{ watervalue }}°C</strong><br />
-                       <small>({{ watertime }})</small>
+                       <strong>Wasser: {{ watervalue|round(1) }}°C</strong><br />
+                       <small>({{ watertime.strftime('%Y-%m-%d %H:%M') }})</small>
                </p>
                </div>
 
                <h2>Der See</h2>
-               <div id="chart1"></div>
-               <div id="chart7"></div>
-               <div id="chart31"></div>
-               <div id="chart365"></div>
+               <div id="chart_water_1"></div>
+               <div id="chart_water_7"></div>
+               <div id="chart_water_31"></div>
+               <div id="chart_water_365"></div>
+
+               <h2>Die Luft</h2>
+               <div id="chart_air_1"></div>
+               <div id="chart_air_7"></div>
+               <div id="chart_air_31"></div>
+               <div id="chart_air_365"></div>
 
                <!-- openweathermap widget -->
                <div id="openweathermap-widget-15"></div>
@@ -57,6 +74,9 @@
                })();
                </script>
 
+               <hr />
+               <p><small><a href="https://git.toastfreeware.priv.at/chrisu/seepark.git">Source code</a></small></p>
+               
                <!-- Load own javascript code -->
                <script src="{{url_for('static', filename='seepark_web.js')}}"></script>