This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
/
index.html
269 lines (239 loc) · 10.8 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<title>HRT Bus Finder</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<script type="text/javascript">
var _gaq = _gaq || [];
var pluginUrl = '//www.google-analytics.com/plugins/ga/inpage_linkid.js';
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);
_gaq.push(['_setAccount', 'UA-39303796-2']);
// Don't track the page view here.
// Track it in busfinder.js each time the router does it's thing.
(function() {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
<link href="./css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="./css/bootstrap-responsive.css" rel="stylesheet">
<link href="./css/busfinder.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Arvo:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon" href="./img/favicon.png">
<link rel="shortcut icon" type="image/x-icon" href="./img/favicon.ico" />
<script type="text/template" id="snow-route-template">
<div id="snow-mode">
<div class="container">
<img id="logo" src="img/favicon-rounded.png" alt="hrt logo">
<h1>Goodbye</h1>
<p>First, the good news... HRT is upgrading their IT systems and will add true real-time support. This means you'll be able to choose from a bunch of amazing transit apps to get real-time bus information.</p>
<p>The bad news is that HRT has to turn off our data feed before the new system is ready. We are sorry that you will be without real-time data for a bit, but we are so excited that we can finally sunset our little app.</p>
<p>Thanks to all the Code for Hampton Roads volunteers who built this app and supported it for the last 8 years. Thanks to everyone who has donated money to help pay our monthly server bill. We'll see you around!</p>
</div>
</div>
</script>
</head>
<body>
<!--[if lt IE 9]>
<div id="upgrade-message">
<div>
<img id="logo" src="img/favicon-rounded.png" alt="">
<p class="chromeframe">HRT Bus Finder works best with Chrome, Firefox, Safari, and Internet Explorer 9+.<br>Please <a href="//browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
</div>
</div>
<![endif]-->
<div id="disclaimer" class="modal fade in" data-backdrop="static" data-keyboard="false" style="display: none;">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h3>Disclaimer</h3>
</div>
<div class="modal-body">
<p>Hampton Roads Transit (HRT) is providing real time data contained [in this app] on an experimental basis. HRT cannot be held responsible for the accuracy of this data. Any applications using this data are not made by HRT, and HRT does not sell or license the apps. They are written by third parties unless otherwise noted.
HRT shall not be held responsible for the content of third party websites or any issue arising from the use of third party applications. HRT neither endorses any third party products that use this data nor makes any guarantees or representations as to accuracy or reliability. Proceed with care and understand any usage charges that may apply to you. HRT reserves the right to remove/modify this real time data listing without notice. </p>
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">I accept.</a>
</div>
</div>
</div>
</div>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<div class="span2 quarter">
<a class="brand"><img alt="HRT Bus Logo" width="75" src="./img/logo-small.png" ></a>
</div>
<div class="span8 half">
<h1 id="title">HRT Bus Finder</h1>
</div>
<div class="span2 quarter">
<button class="btn-current-location btn btn-info btn-address pull-right menu-trigger"><i class="icon-th-list icon-white"></i></button>
</div>
<nav id="menu" style="display: none">
<ul>
<li><a href="#/">Home</a></li>
<li><a href="#/routes/">Routes</a></li>
<li><a href="#/findStops/">Stop Finder</a></li>
<li><a href="//gohrt.ticketleap.com/">Buy a Ticket</a></li>
<li><a href="//github.com/code4hr/hrt-bus-finder/wiki/User-Guide">User Guide</a></li>
<li><a href="#/feedback/">Feedback</a></li>
<li id="about">
<h3>About</h3>
<p>HRT Bus Finder was developed by volunteers from <a href="//code4hr.org">Code for Hampton Roads</a> in cooperation with <a href="//gohrt.com">Hampton Roads Transit.</a></p>
<p>For help using this app or to answer any questions, contact us using <a href="//hrtbus.uservoice.com">UserVoice</a>.</p>
<br>
<div class="text-center">Powered by</div>
<img src="./img/rackspace.png">
</li>
</ul>
</nav>
</div>
</div>
</div>
<div id="loading">
<div>
<img src="./img/466.gif" alt="">
<p>HRT Bus Finder is loading.</p>
</div>
</div>
<div id="geolocation-failed" style="display: none" class="alert alert-info">
<p>There was an error and we couldn't find your location, but you can still find what you need by searching by Route or using the Stop Finder.</p>
<form action="#/routes/">
<button class="btn-info">Route</button>
</form>
<form action="#/findStops/">
<button class="btn-info">Stop Finder</button>
</form>
</div>
<div class="app-container container">
<div id="stops"></div>
</div>
<script src="./js/jquery-2.0.2.js"></script>
<script src="./js/jquery.jpanelmenu.js"></script>
<script src="https://maps.google.com/maps/api/js?sensor=true&key=AIzaSyCDtIEIpqD0BBG_e9rja4TxKWTxA7WvVKI"></script>
<script src="./js/underscore-min.js"></script>
<script src="./js/backbone.js"></script>
<script src="./js/bootstrap.min.js"></script>
<script src="./js/busfinder.js"></script>
<script src="./js/modernizr.js"></script>
<script type="text/template" id="stop-template">
<div class="stop-name"><h4><%= stopName %></h4> <p>(Stop <%= stopId %>)</p></div>
<div class="arrivals">
<div class="row-fluid head-label">
<div class="span2 quarter">
<p>Route</p>
</div>
<div class="span8 half">
<p>Destination</p>
</div>
<div class="span2 quarter">
<p>Minutes</p>
</div>
</div>
<div class="table">
</div>
</div>
</script>
<script type="text/template" id="arrival-template">
<div class="row-fluid">
<div class="span2 route quarter"><%= routeShortName %></div>
<div class="span8 destination half">
<p><%= destination %></p>
</div>
<div class="span2 timeframe quarter"><%= arriveMinutes %></div>
</div>
<div class="mapcanvas"></div>
<div class="extended-info" style="display:none;">
<span>Location of <strong>Bus <%= busId %></strong> as of <strong><span class='lastUpdate'><%= lastUpdate %></span></strong>.</span>
<p class="arrival-time">Scheduled Arrival: <strong><%= arriveTime %></strong> - <%= adherence %></p>
</div>
<div class="arrow">
<img src="img/arrow-down.png"/>
</div>
</script>
<script type="text/template" id="route-view-template">
<select id="route">
<option selected="selected" value="">All Routes</option>
<% _.each(routes, function(route) { %>
<option value="<%= route.route_short_name %>"><%= route.route_short_name %> - <%= route.route_long_name %></option>
<% }); %>
</select>
<div class="mapcanvas"></div>
</script>
<script type="text/template" id="find-stops-view-template">
<div id="find-options">
<form class="form-inline">
<input id="intersection" type="text" placeholder="Intersection">
<select id="city">
<option selected>City</option>
<option>Chesapeake</option>
<option>Hampton</option>
<option>Newport News</option>
<option>Norfolk</option>
<option>Portsmouth</option>
<option>Virginia Beach</option>
</select>
<button id="search" class="btn">Search</button>
<button id="locate" class="btn">Current Location</button>
</form>
</div>
<div class="mapcanvas"></div>
</script>
<script type="text/template" id="user-feedback-template">
<div id="feedback">
<h1>Feedback</h1>
<p>Having troubles? Have a feature idea? Just want to say thanks to the volunteers in Hampton Roads who built/support this site?</p>
<form action="mailto:[email protected]" method="post" enctype="text/plain">
<input placeholder="Name" name="name" type="text">
<label for="name">Name</label>
<input placeholder="email address" name="email" type="text">
<label for="email">Email</label>
<textarea name="comment" placeholder="Your feedback here..." id="" cols="30" rows="5"></textarea>
<label for="feedback">Feedback</label>
<button type="submit" class="btn">Submit</button>
</form>
</div>
</script>
<script type="text/template" id="stop-list-template">
<div class="card">
<div class="imminent onefive"></div>
<div class="imminent05 onefive"></div>
<div class="imminent10 onefive"></div>
<div class="imminent15 onefive"></div>
<div class= "clearfix"></div>
<label class="pull-left">Arriving Now</label>
<label class="pull-right">Arriving Later</label>
</div>
<div id="stops"></div>
<button class='loadMore'>Refresh</button>
</script>
<script>
function supports_html5_storage() {
try {
return 'localStorage' in window && window['localStorage'] !== null;
} catch (e) {
return false;
}
}
$(function () {
if(!supports_html5_storage() || localStorage['disclaimer_accepted'] !== 'true') {
//$("#disclaimer").modal('show');
}
});
$('#disclaimer a').click(function() {
$("#disclaimer").modal('hide');
if(supports_html5_storage()) {
localStorage['disclaimer_accepted'] = 'true';
}
});
</script>
</body>
</html>