Permalink
Browse files

Add a title and an About link, and an About page for that link to go …

…to, and use a web font from Google.
  • Loading branch information...
1 parent 55da7a2 commit 0277c61983ee121e47ccefe89b36ae4e20ea8078 @amonat committed Mar 16, 2012
Showing with 34 additions and 3 deletions.
  1. +4 −0 map.rb
  2. +22 −0 views/about.erb
  3. +8 −3 views/map2.erb
View
4 map.rb
@@ -104,6 +104,10 @@ def stopInfo
erb :map2
end
+get '/about' do
+ erb :about
+end
+
get '/bikedata-dc' do
xmlDoc('http://www.capitalbikeshare.com/stations/bikeStations.xml')
end
View
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
+ <title>Boston Subway & Hubway Tracker</title>
+ <style type="text/css">
+ body { font-family: 'Simonetta', cursive; }
+ .title { padding-left: 5px; }
+ .tagline { font-style: italic; font-size: 12px; }
+ .info { padding-left: 10px; padding-top: 10px;}
+ </style>
+ <link href='http://fonts.googleapis.com/css?family=Simonetta' rel='stylesheet' type='text/css'>
+ </head>
+ <body>
+ <div class="title"><a href="/">BostonBikeApp</a> <span class="tagline">Live Hubway & MBTA Subway Map</span></div>
+ <div class="info">BostonBikeApp is a quick way to look up the availability of bicycles for Boston's Hubway bike sharing system.
+ Bike stations with available bikes are shown in green. Stations without bikes to rent are shown in red.
+ If you want to find out if there are free docks to return your Hubway bike, just click on the station and you'll
+ see how many empty docks there are! And if your trip includes riding the T, you'll find green arrows marking MBTA stations.
+ Click on a T station and we'll look up when the next trains are coming (not counting the Green Line!).</div>
+ </body>
+</html>
View
@@ -5,9 +5,12 @@
<title>Boston Subway & Hubway Tracker</title>
<style type="text/css">
html { height: 100% }
- body { height: 100%; margin: 0; padding: 0 }
+ body { height: 100%; margin: 0; padding: 0; font-family: 'Simonetta', cursive; }
#map_canvas { width: 800px; height: 600px; }
+ .title { padding-left: 5px; }
+ .tagline { font-style: italic; font-size: 12px; }
</style>
+ <link href='http://fonts.googleapis.com/css?family=Simonetta' rel='stylesheet' type='text/css'>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDXTd7O08ocftNQ_phwWOE57lZytjVlxxU&sensor=true">
</script>
@@ -20,8 +23,8 @@
];
var setFullSizeIfPhone = function() {
- if (navigator.userAgent.indexOf('iPhone') != -1 || navigator.userAgent.indexOf('Android') != -1 ) {
- $("#map_canvas").width('100%').height('100%');
+ if (navigator.userAgent.indexOf('iPhone') != -1 || navigator.userAgent.indexOf('Android') != -1 || true) {
+ $("#map_canvas").width('100%').height('90%');
}
}
@@ -159,6 +162,8 @@
</script>
</head>
<body>
+ <div class="title">BostonBikeApp <span class="tagline">Live Hubway & MBTA Subway Map</span></div>
<div id="map_canvas"></div>
+ <div class="footer"><a href="/about">About</a></div>
</body>
</html>

0 comments on commit 0277c61

Please sign in to comment.