-
Notifications
You must be signed in to change notification settings - Fork 183
/
lab_temp_v3.html
68 lines (66 loc) · 3.04 KB
/
lab_temp_v3.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<html>
<meta charset="utf-8">
<title>Lab Conditions by RPi</title>
<meta http-equiv="refresh" content="10">
<meta name="description" content="Lab conditions - RPi">
<meta name="author" content="Peter Dalmaris">
<!-- Mobile Specific Metas
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- FONT
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
<!-- CSS
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="stylesheet" href="/static/css/normalize.css">
<link rel="stylesheet" href="/static/css/skeleton.css">
<!-- Favicon
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="icon" type="image/png" href="/static/images/favicon.png">
</head>
<body>
<div class="container">
<div class="row">
<div class="two-third column" style="margin-top: 5%">
<h2>Real time lab conditions</h2>
<h1>Temperature: {{"{0:0.1f}".format(temp) }}°C</h1>
<h1>Humidity: {{"{0:0.1f}".format(hum)}}%</h1>
<p>This page refreshes every 10 seconds</p>
</div>
</div>
<div class="row">
<div class="eleven columns">
<form id="range_select" action = "/lab_env_db" method="GET">
<input type="hidden" class="timezone" name="timezone" />
<div class="one column">
<input type="radio" name="range_h" value="3" id="radio_3" /><label for="radio_3">3hrs</label>
</div>
<div class="one column">
<input type="radio" name="range_h" value="6" id="radio_6" /><label for="radio_6">6hrs</label>
</div>
<div class="one column">
<input type="radio" name="range_h" value="12" id="radio_12" /><label for="radio_12">12hrs</label>
</div>
<div class="one column">
<input type="radio" name="range_h" value="24" id="radio_24" /><label for="radio_24">24hrs</label>
</div>
</form>
</div>
</div>
</body>
<!-- Fetch jQuery -->
<script src="//code.jquery.com/jquery-3.5.0.slim.min.js"></script>
<!-- jstimezonedetect script start -->
<script src="//cdnjs.cloudflare.com/ajax/libs/jstimezonedetect/1.0.7/jstz.min.js" ></script>
<script>
jQuery( document ).ready(function() {
timezone = jstz.determine();
jQuery("#timezone").text(timezone.name());
});
jQuery("#range_select input[type=radio]").click(function(){
timezone = jstz.determine();
jQuery(".timezone").val(timezone.name());
jQuery("#range_select").submit();
});
</script>
</html>