-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·107 lines (92 loc) · 2.89 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<html>
<head>
<style type="text/css">
body {margin: 0; padding: 0; background-color: #000; overflow: hidden;}
iframe { overflow: hidden; width: 100%; height: 100%; border: 0; display: none;}
#overlay {
position: absolute;
color: white;
top: 0;
left: 0;
width: 5%;
height: 768px;
font-weight: bold;
font-size: 1.5em;
}
#overlay.open {
background-color: green;
}
#overlay.closed {
display: none;
}
#overlay .vertical {
transform:rotate(-90deg);
-webkit-transform:rotate(-90deg); /* Safari and Chrome */
width: 768px;
height: 1em;
margin-left: -360px;
margin-top: 200px;
}
</style>
</head>
<body onload="onload()">
<script language="javascript" >
var numberOfPanes = 5; // set this when you add/remove frames
var pane = 1; // just a counter
var interval = 5000; // milliseconds between iframes
var intervalID=self.setInterval("swap()", interval); // begin swaps
self.setInterval("window.location.reload()", 3600000); // reload the page every hour
function onload() {
firstPane = document.getElementById("frame1");
firstPane.style.display="block";
}
function swap() {
if(pane == 2) {
// pane is already 2; reset to normal interval
self.clearInterval(intervalID);
intervalID=self.setInterval("swap()", interval);
}
thisPane = document.getElementById("frame"+pane);
thisPane.style.display="none";
if(pane < numberOfPanes) {
pane++;
}
else {
pane = 1;
}
nextPane = document.getElementById("frame"+pane);
nextPane.style.display="block";
if(pane == 3) {
// pane 3 is slideshow; delay interval so it stays longer
self.clearInterval(intervalID);
intervalID=self.setInterval("swap()", interval*3);
}
}
</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<div id="overlay" class="closed">
<div id="door_status" class="vertical"></div>
</div>
<iframe id="frame1" src="splash.html"></iframe>
<iframe id="frame2" src="description.html"></iframe>
<iframe id="frame3" src="slideshow.html"></iframe>
<iframe id="frame4" src="calendar.html"></iframe>
<iframe id="frame5" src="ads.html"></iframe>
<script type="text/javascript">
var url = 'http://intranet.heatsynclabs.org/cgi-bin/spaceapi.rb';
var doorStatus = $('#door_status');
$.get(url, function( data ) {
console.log( data );
if(doorStatus){
if(data.open){
$("#overlay").addClass("open").removeClass("closed");
doorStatus.html('We are currently OPEN! Come on inside!');
} else {
$("#overlay").addClass("closed").removeClass("open");
doorStatus.html('We are currently closed. Come back later!');
}
}
});
</script>
</body>
</html>