-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
52 lines (50 loc) · 2.05 KB
/
index.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
<!doctype html>
<html>
<head>
<meta name="charset" value="utf-8">
<title>Roker</title>
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,700|Open+Sans:400,300,800" type="text/css">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<dl id="weather_data">
<dt>Currently</dt>
<dd id="current_temp"></dd>
<dt>High</dt>
<dd id="current_high"></dd>
<dt>Low</dt>
<dd id="current_low"></dd>
<img id="weather_condition" alt="">
</dl>
<div id="weather_chart"></div>
<script src="js/libs/jsonp.js"></script>
<script src="js/libs/q.js"></script>
<script src="js/libs/highcharts_standalone_adapter.js"></script>
<script src="js/libs/highcharts.js"></script>
<script src="js/kiosk.js"></script>
<script src="js/weather_api.js"></script>
<script src="js/weather_station.js"></script>
<script>
;(function(root) {
try {
var weather_station = new WeatherStation(YOUR_API_KEY);
}
catch (e) {
if (e.name === 'ReferenceError') {
console.warn('You must enter your Weather Underground API key! Run the ./configure script to add your key.');
};
}
// Refresh every two hours. Something here is currently leaking
// memory, and slowly brings Raspbian to a halt. Once a stable
// build is released, or the leak is determined, this can be
// refactored to make an XHR to update the page data on-the-fly.
//
// @see https://github.com/restlessdesign/roker/issues/5
const REFRESH_RATE = 1000 * 60 * 60 * 2;
setTimeout(function() {
window.location.reload();
}, REFRESH_RATE);
}(window));
</script>
</body>
</html>