-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·192 lines (162 loc) · 6.4 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
<!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>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>eTa | by Team One</title>
<meta name="description" content=" "> <!-- ADD A DESCRIPTION -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<meta name="apple-mobile-web-app-title" content="AddToHome">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!-- icon links -->
<link rel="apple-touch-icon" href="img/iPhone.png">
<link rel="apple-touch-icon" sizes="72x72" href="img/iPad.png">
<link rel="apple-touch-icon" sizes="114x114" href="img/[email protected]">
<link rel="apple-touch-icon" sizes="144x144" href="img/[email protected]">
<link rel="stylesheet" href="css/add2home.css">
<script type="text/javascript" src="js/add2home.js" charset="utf-8"></script>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/custom_fonts.css" />
<script src="js/vendor/modernizr-2.6.2.min.js"></script>
<script type="text/javascript" src="js/moment.js"></script>
<script type="text/javascript" src="jquery.mobile-1.3.2.js"></script>
<script type="text/javascript" src="js/leaflet.js"></script>
<script type="text/javascript" src="js/tomtom.map.js"></script>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
/*var addToHomeConfig = {
message: 'Feel free to bookmark this on your home screen with %icon.'
};*/</script>
</head>
<body>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- T1 ICON -->
<!-- SLIDER CONTENT -->
<div id="cbp-fwslider" class="cbp-fwslider">
<img class="t1-icon" src="img/t1-icon.png"/>
<ul>
<!-- SLIDE 1 -->
<li class="slide one" data-role="page">
<div class="time-card">
<h2 id="lexustime" class="number" ></h2>
<p class="minutes">Minutes</p>
</div>
<div class="secondary-block">
<div><img src="img/lex-icon.png"/></div>
<p class="copy" id="1">
Estimated driving time to:
<br/>
<span class="lexus"><em><strong>Lexus HQ</strong></em></span>
</p>
</div>
</li>
<!-- SLIDE 2 -->
<li class="slide two" data-role="page">
<div class="time-card">
<h2 id="airporttime" class="number"></h2>
<p class="minutes">Minutes</p>
</div>
<div class="secondary-block">
<img src="img/plane-icon.png"/>
<p class="copy" id"2">
Estimated driving time to:
<br/>
<span class="lax"><em><strong>LAX</strong></em></span></span>
</p>
</div>
</li>
<!-- SLIDE 3 -->
<li class="slide three" data-role="page">
<div class="time-card">
<h2 id="beachtime" class="number"></h2>
<p class="minutes">Minutes</p>
</div>
<div class="secondary-block">
<div><img src="img/beach-icon.png"/></div>
<p class="copy" id="3">
Estimated driving time to:
<br/>
<span class="beach"><em><strong>The Beach</strong></em></span>
</p>
</div>
</li>
</ul>
</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
<script src="js/jquery.cbpFWSlider.js"></script>
<script>$( function() {var s = $( '#cbp-fwslider' ).cbpFWSlider();} );</script>
<script>
// Here be the seconds and the Tom Tom URL request for Team One
//(The Reserve:33.9753358,-118.4256124) to 3 locations
$.ajax({
url:"https://api.tomtom.com/lbs/services/route/3/33.9753358,-118.4256124:33.85716,-118.30965/Quickest/jsonp?includeTraffic=true&time=now&trafficModelID=-1&includeInstructions=false&key=5zbbuuejq22suvrg4fjrg3fs&jsonp=?&callback=?",
dataType:"jsonp",
success:function(data){
// console.log(data); DEBUGS
var totalSeconds = data.route.summary.totalTimeSeconds;
var humanTime = Math.round(totalSeconds/60);
console.log(humanTime);
$('#lexustime')
.html(humanTime);
},
error:function(e){
}
});
$.ajax({
url:"https://api.tomtom.com/lbs/services/route/3/33.9753358,-118.4256124:33.942449,-118.407876/Quickest/jsonp?includeTraffic=true&time=now&trafficModelID=-1&includeInstructions=false&key=5zbbuuejq22suvrg4fjrg3fs&jsonp=?&callback=?",
dataType:"jsonp",
success:function(data){
// console.log(data); DEBUGS
var totalSeconds = data.route.summary.totalTimeSeconds;
var humanTime = Math.round(totalSeconds/60);
console.log(humanTime);
$('#airporttime')
.html('<p>'+humanTime+'</p>');
},
error:function(e){
}
});
$.ajax({
url:"https://api.tomtom.com/lbs/services/route/3/33.9753358,-118.4256124:33.917347,-118.429291/Quickest/jsonp?includeTraffic=true&time=now&trafficModelID=-1&includeInstructions=false&key=5zbbuuejq22suvrg4fjrg3fs&jsonp=?&callback=?",
dataType:"jsonp",
success:function(data){
// console.log(data); DEBUGS
var totalSeconds = data.route.summary.totalTimeSeconds;
var humanTime = Math.round(totalSeconds/60);
console.log(humanTime);
$('#beachtime')
.html('<p>'+humanTime+'</p>');
},
error:function(e){
}
});
</script>
<script>
$('li[data-role="page"]').live("swipeleft", function () {
var nextpage = $(this).next('li[data-role="page"]');
if (nextpage.length > 0) {
$.mobile.changePage(nextpage, "slide", false, true);
}
});
$('li[data-role="page"]').live("swiperight", function () {
var prevpage = $(this).prev('li[data-role="page"]');
if (prevpage.length > 0) {
$.mobile.changePage(prevpage, {
transition: "slide",
reverse: true
}, true, true);
}
});
</script>
</body>
</html>