-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
68 lines (54 loc) · 1.85 KB
/
Copy pathindex.html
File metadata and controls
68 lines (54 loc) · 1.85 KB
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
<!DOCTYPE html>
<html lang='en'>
<head>
<title>TransitTable</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css?family=Lora&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="normalize.css" />
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>TransitTable</h1>
<h2>Get bus schedules for Victoria BC</h2>
<div v-cloak id=main>
<input type=text v-model="stop_id"
placeholder="Enter a stop number"
onblur="this.placeholder = 'Enter a stop number'"
onfocus="this.placeholder = ''"
v-on:keyup.enter="submit">
<button v-on:click="submit">Look up bus times</button>
<div v-if="state == 'displaying'">
<div class=row>
<div class=col>
<p class="left list-label">Departure Time</p>
</div>
<div class=col id=mid>
</div>
<div class=col>
<p class="right list-label">Route</p>
</div>
</div>
<div class=row v-for="time in times">
<div class=col>
<p class=left >{{time.departure_time}}</p>
</div>
<div class=col id=mid>
<hr/>
</div>
<div class=col>
<p class=right >{{time.route_id}}</p>
</div>
</div>
<p id=notice>Data courtesy of BC Transit.</p>
</div>
<div v-else-if="state == 'load-error'">
<p>
<strong>{{bad_id}}</strong> is not a valid stop number. Please enter a different stop number.
</p>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
<script type="module" src="scripts/main.js"></script>
</body>
</html>