forked from cuny-nytech/single-purpose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout.erb
30 lines (30 loc) · 955 Bytes
/
layout.erb
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
<!doctype html>
<html lang="en"
<head>
<link href="/home.css" rel="stylesheet">
<title>nystream</title>
<script language="JavaScript" type="text/javascript">
var t = 1000;
var image = "http://207.251.86.238/cctv" + <%= @currentcam %> + ".jpg"
function reloadpic() {
document.getElementById("pic").src= image + "?math=" +
new Date().getTime();
setTimeout("reloadpic()", t);
}
</script>
</head>
<body onload="reloadpic()">
<% time = Time.new; if 10 < time.utc.hour || time.utc.hour < 22 %>
<div id="background">
<img src="http://cloud3.collegefashion.net/wp-content/uploads/2010/07/nyc-skyline1.jpg" id="im">
</div>
<% end %>
<% time = Time.new; if 22 <= time.utc.hour || time.utc.hour <= 10 %>
<div id="background">
<img src="http://41.media.tumblr.com/413aa6e7f2644d788d32b3d1a634474f/tumblr_mq76doVggn1sa9b5no1_500.jpg" id="im">
</div>
<% end %>
<div id="txt"></div>
<%= yield %>
</body>
</html>