-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
120 lines (107 loc) · 4.41 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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<!-- title -->
<title>Train Tracker</title>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<!-- custom css -->
<link rel="stylesheet" href="./css/style.css">
<!-- JQuery -->
<script src="https://code.jquery.com/jquery.js"></script>
<!-- jQuery validation -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> -->
<!-- Firebase References -->
<script src="https://www.gstatic.com/firebasejs/6.0.4/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/6.0.4/firebase-database.js"></script>
<!-- Moment.js Reference -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
</head>
<body>
<!-- Train Scheduler Container-->
<div class="container">
<!-- Jumbotron -->
<div class="jumbotron">
<h1>Train Scheduler</h1>
<h3>A Comprehensive Directory of Trains</h3>
</div>
<!-- row 1 -->
<div class="row">
<!-- column -->
<div class="col-12">
<!-- Current Trains-->
<div class="card mb-4">
<div class="card-header">Current Trains</div>
<div class="card-body">
<table class="table table-sm table-hover" id='train-table'>
<thead>
<tr>
<th scope="col">Train Name</th>
<th scope="col">Destination</th>
<th scope="col">Frequency (min)</th>
<th scope="col">Next Arrival</th>
<th scope="col">Minutes Away (min)</th>
</tr>
</thead>
<tbody>
<!-- dynamic content is inserted in tbody -->
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- row 2 -->
<div class="row">
<div class="col-12">
<!-- Add Train -->
<div class="card mb-4">
<div class="card-header">Add Train</div>
<div class="card-body">
<!-- Entry Form -->
<form id="train-form">
<fieldset>
<div class="form-group">
<label for="train-name-input">Train Name</label>
<span class="error-form" id="name-error-message"></span>
<input class="form-control" id="train-name-input" type="text" name="name" minlength="1"
placeholder="Thomas" required>
</div>
<div class="form-group">
<label for="destination-input">Destination</label>
<span class="error-form" id="destination-error-message"></span>
<input class="form-control" id="destination-input" type="text" name="destination"
placeholder="choochoo station" minlength="1" required>
</div>
<div class="form-group">
<label for="start-input">First Train Time (HH:mm - Military Time)</label>
<span class="error-form" id="time-error-message"></span>
<input class="form-control" id="start-input" type="text" name="time" placeholder="08:30" maxlength="5"
minlength="4" min="0000" max="2359" required>
</div>
<div class="form-group">
<label for="frequency-input">Frequency (min)</label>
<span class="error-form" id="frequency-error-message"></span>
<input class="form-control" id="frequency-input" type="text" name="frequency" minlength="1" required>
</div>
<button class="btn btn-primary" id="add-train-btn">Submit</button>
</fieldset>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- validation -->
<!-- <script src="./javascript/validate.js"></script> -->
<script src="./javascript/jquery.mask.js"></script>
<!-- JavaScript -->
<script src="./javascript/app.js"></script>
</body>
</html>