-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
214 lines (190 loc) · 6.45 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Virtual Running on StreetView</title>
<meta name="description" content="Virtual Running on Google Street View">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="./node_modules/purecss/build/pure-min.css">
<link rel="icon" href="public/favicon.ico">
<style>
#map {
height: 100%;
}
html,
body,
.App {
height: 100%;
margin: 0;
padding: 0;
}
.App {
display: flex;
flex-direction: column;
}
.App .StreetView {
flex: 8;
max-height: 70%;
overflow-y: scroll;
}
.App .RunningController {
flex: 1;
max-height: 25%;
overflow-y: scroll;
color: white;
background-color: #3b4045;
}
.App .AppFooter {
flex: 1;
max-height: 5%;
font-size: 12px;
text-align: center;
background-color: #ddd;
}
/* StreetView */
.StreetView,
.StreetView-map {
width: 100%;
height: 100%;
}
.StreetView-placeholder {
color: #777;
line-height: 1.6;
padding: 0 1rem;
text-align: center;
}
.StreetView-placeholderHeader {
font-family: Raleway, Helvetica Neue, Helvetica, Arial, sans-serif;
max-width: 768px;
margin: 0 auto;
padding: 0.5em;
text-align: center;
border-bottom: 1px solid #eee;
background: #fff;
letter-spacing: .05em;
}
.StreetView-placeholderBody {
padding: 1rem;
}
.StreetView-placeholder h1 {
font-size: 2rem;
color: #4b4b4b;
}
.StreetView-placeholder h2 {
font-size: 1.2rem;
line-height: 1.5;
color: #666;
letter-spacing: -.02em;
}
.StreetView-placeholderText {
font-size: 24px;
margin: 12px;
}
/* RunningController */
.RunningController {
display: flex;
}
.RunningController > .RunningController-control {
flex: 3;
max-width: 720px;
margin: auto;
/* center */
display: flex;
flex-direction: column;
}
.RunningController > .RunningController-window {
flex: 1;
margin: auto;
max-width: 320px;
/* center */
display: flex;
flex-direction: column;
justify-content: center;
}
.RunningController-control {
padding: 0 12px;
}
.RunningController-controlForm {
width: 100%;
}
.RunningController-inputGoogleMapAPIKey {
width: 18em;
max-width: 20em;
}
.RunningController-loadButton {
width: 18em;
color: white;
background: #117f2c;
}
.RunningController-trialButton {
width: 18em;
color: white;
background: rgb(175, 27, 79);
}
.RunningController-window {
display: flex;
align-content: center;
align-items: center;
}
</style>
</head>
<body>
<div class="App">
<!-- StreetView -->
<main class="StreetView">
<div id="js-street-view" class="StreetView-map">
<div class="StreetView-placeholder">
<header class="StreetView-placeholderHeader">
<h1>Virtual Running on StreetView</h1>
<h2>To detect your motion via WebCamera and go forward on Google Street View Map!</h2>
</header>
<div class="StreetView-placeholderBody">
<p class="StreetView-placeholderText">
<a class="pure-form-message-inline" href="https://github.com/azu/running-on-streetview"
target="_blank" rel="noopener">Please see usage guide before running!</a>
</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/7nCMXVh9ht8" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
</div>
</main>
<!-- RunningController -->
<aside class="RunningController">
<div id="js-RunningController-control" class="RunningController-control">
<form id="js-RunningController-controlForm"
class="RunningController-controlForm pure-form pure-form-aligned"
autocomplete="off">
<fieldset>
<div class="pure-control-group">
<label for="js-google-map-api-key">Google Map API Key:</label>
<input id="js-google-map-api-key"
class="RunningController-inputGoogleMapAPIKey">
<a class="pure-form-message-inline" style="color:white"
href="https://github.com/azu/running-on-streetview#how-to-get-google-map-api-key"
rel="noopener">*Required</a>
</div>
<div class="pure-controls">
<button type="submit" id="js-load-button"
class="RunningController-loadButton pure-button">Load
</button>
</div>
<div class="pure-controls">
<button type="button" id="js-trial-button"
class="RunningController-trialButton pure-button">
Free Trial (Limited)
</button>
</div>
</fieldset>
</form>
</div>
<div class="RunningController-window">
<video autoplay id="js-RunningController-video" width="320" height="240"></video>
</div>
</aside>
<footer class="AppFooter">
<p>MIT © azu - Source Code on <a href="https://github.com/azu/running-on-streetview">GitHub</a></p>
</footer>
</div>
<script src="./src/bootstrap.ts"></script>
</body>
</html>