Skip to content

Commit

Permalink
re-added the views folder
Browse files Browse the repository at this point in the history
  • Loading branch information
bcavallo committed Oct 18, 2014
1 parent f8a16b4 commit 3c9bdbc
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 0 deletions.
6 changes: 6 additions & 0 deletions views/home.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div id="centered">
<h1><a href="/<%= @nextcam %>">Click to Stream</a><h1>
</div>
<div id="centered" style="top: 50%;">
<h2><a href="/weather">Or check the NYC weather!</a></h2>
</div>
30 changes: 30 additions & 0 deletions views/layout.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,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>
6 changes: 6 additions & 0 deletions views/stream2.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<a href="/weather" style="z-index: 1; position: fixed; color: black;">Weather</a>
<div id="main">
<a href="/<%= @nextcam %>">
<img src="http://207.251.86.238/cctv<%= @currentcam %>.jpg?" id="pic">
</a>
</div>
11 changes: 11 additions & 0 deletions views/weather.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head></head>
<body>
<h1> Simple NYC Weather:</h1>
<h2> <%= @wcondstr %> </h1>
<h2> <%= @temp %> </h2>
<a href="/<%= @nextcam %>">See a random traffic camera</a>
</body>
</html>

0 comments on commit 3c9bdbc

Please sign in to comment.