-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
93 lines (91 loc) · 5.83 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
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Track Builder</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
</head>
<body class="d-flex flex-column min-vh-100">
<nav class="navbar navbar-expand-lg navbar-light bg-light px-4 border">
<h1 id="home-link">Track Builder</h1>
</nav>
<div class="pt-3 px-3">
<div class="container-fluid pb-5">
<div class="row">
<div class=" col-md-3">
<div class="card mb-3 bg-light">
<div class="card-body">
<div class="col-md-12">
<h5 class="mb-3 text-center">Search for tracks by title</h5>
<div class="form-row">
<div class="col-md-12">
<input id="track-name-search" class="form-control" type="text" placeholder="Track name"></input>
</div>
</div>
</div>
</div>
</div>
<container id="track-list"></container>
</div>
<div class="col-md-6 min-width-560-md">
<div class="card py-3 bg-light">
<canvas id="track-display" width="540" height="540"></canvas>
</div>
</div>
<div class=" col-md-3">
<div class="card mb-3 bg-light">
<div class="card-body">
<div id="creating">
<div class="form-row">
<div id="error-messages" class="col-md-12 mb-3 text-justify text-danger">
</div>
<div class="col-md-12 mb-3">
<input id="track-name-input" class="form-control" type="text" placeholder="Track name"></input>
</div>
<div class="col-md-12 mb-3">
<input id="track-creator-input" class="form-control" type="text" placeholder="Track creator"></input>
</div>
<div class="col-md-12 mb-3 text-justify">
<p>Drag and drop the track segments below onto the grid to create your new track.</p>
<p>The track must form a complete loop, with no segments placed not contained in the loop.</p>
</div>
<div class="col-md-12 mb-3">
<container class="card-deck px-5" id="segment-list"></container>
</div>
<div class="col-md-12 mb-3">
<button id="save-track" class="btn btn-outline-primary btn-block">Save your track</button>
</div>
<div class="col-md-12 mb-3">
<button id="discard-track" class="btn btn-outline-danger btn-block">Discard track</button>
</div>
</div>
</div>
<div id="viewing">
<div class="col-md-12 mb-3 text-justify">
<h5 class="text-center" id="track-name"></h5>
<p class="text-center" id="created-by"></p>
<p>To return to the home menu, click 'Track Builder' in the navbar.</p>
</div>
<button id="edit-track" class="btn btn-outline-success btn-block" style="display: none;">Edit track</button>
<button id="delete-track" class="btn btn-outline-danger btn-block" style="display: none;">Delete track</button>
</div>
<div id="home">
<div class="col-md-12 mb-3 text-justify">
<p class="text-center font-weight-bold">Welcome to track builder!</p>
<p>View tracks created by other users by searching for them in the panel on the left. To create your own track, click the button below.</p>
<p>To return to this menu at any time, click 'Track Builder' in the navbar.</p>
</div>
<button id="new-track" class="btn btn-outline-primary btn-block">Create a new track</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="src/models/track.js" type="text/javascript"></script>
<script src="src/models/segment.js" type="text/javascript"></script>
<script src="src/services/trackApi.js" type="text/javascript"></script>
<script src="index.js" type="text/javascript"></script>
</body>
</html>