-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
236 lines (206 loc) · 9.91 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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Path Finding UI</title>
<!-- Custom CSS -->
<link rel="stylesheet" href="assets/board.css">
<link rel="stylesheet" href="assets/cell-animations.css">
<!-- Bootstrap -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ"
crossorigin="anonymous"></script>
<!-- Remix Icon -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css" rel="stylesheet">
</head>
<body>
<!-- Modal -->
<div id="modal" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-dialog-centered modal-sm" role="document">
<div class="modal-content bg-dark text-light">
<div class="modal-header">
<h5 id="modal-title" class="modal-title">Modal title</h5>
<a href="#" id="close-modal" type="a" class="btn-close btn-close-white" data-dismiss="modal"
aria-label="Close">
</a>
</div>
<div id="modal-body" class="modal-body">
</div>
</div>
</div>
</div>
<div id="modal" class="modal">
<div class="modal-content">
<span id="close-modal" class="close">×</span>
<p id="modal-title" class="modal-title"></p>
<p id="modal-body" class="modal-body"></p>
</div>
</div>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top"
style="background-color: rgb(0, 25, 55)!important;">
<a href="#" class="navbar-toggler" type="a" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</a>
<div class="collapse navbar-collapse text-center" id="navbarSupportedContent">
<ul class="navbar-nav m-auto">
<!-- Run a -->
<li class="nav-item" data-toggle="tooltip" title="Run the selected algorithm.">
<a href="#" id="run-btn" class="bg-primary rounded px-5 text-dark nav-link">Run</a>
</li>
<!-- Algorithms -->
<li class="nav-item dropdown px-3">
<a href="#" class="text-dark nav-link dropdown-toggle border-bottom border-white" id="algorithms-dropdown"
role="a" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-toggle="tooltip"
title="Select a path finding algorithm.">
A Star (A*)
</a>
<div class="dropdown-menu dropdown-menu-dark" aria-labelledby="algorithms-dropdown">
<a href="#" id="backtracking-btn" class="dropdown-item">
Backtracking
<p class="warning-info">*Max size: 10 rows</p>
</a>
<div class="dropdown-divider"></div>
<a href="#" id="branch-and-bound-btn" class="dropdown-item">
Branch and bound
<p class="warning-info">*Max size: 25 rows</p>
</a>
<div class="dropdown-divider"></div>
<a href="#" id="a-star-btn" class="dropdown-item">
A Star (A*)
<p class="warning-info">*Max size: 50 rows</p>
</a>
</div>
</li>
<!-- Mazes -->
<li class="nav-item dropdown px-3">
<a href="#" class="text-dark nav-link dropdown-toggle border-bottom border-white" id="mazes-dropdown" role="a"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-toggle="tooltip"
title="Select a maze generator algorithm.">
Generate maze
</a>
<div class="dropdown-menu dropdown-menu-dark" aria-labelledby="mazes-dropdown">
<a href="#" id="random-maze-10-btn" class="dropdown-item">
Random 10%
</a>
<!-- <div class="dropdown-divider"></div> -->
<a href="#" id="random-maze-20-btn" class="dropdown-item">
Random 20%
</a>
<a href="#" id="random-maze-30-btn" class="dropdown-item">
Random 30%
</a>
<a href="#" id="random-star-btn" class="dropdown-item">
My Random Star Maze
</a>
<a href="#" id="random-maze-dfs-btn" class="dropdown-item">
Randomized DFS
</a>
<a href="#" id="random-maze-bfs-btn" class="dropdown-item">
Randomized BFS
</a>
</div>
</li>
<!-- Cell types for drawing -->
<li class="nav-item dropdown px-3">
<a href="#" class=" text-dark nav-link dropdown-toggle border-bottom border-white" id="cell-types-dropdown"
role="a" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-toggle="tooltip"
title="Select a square type to draw.">
Square types
</a>
<div class="dropdown-menu dropdown-menu-dark" aria-labelledby="cell-types-dropdown">
<a href="#" id="begin-btn" class="dropdown-item">
<svg class="begin-node rounded bg-white" fill="#fff" width="24" height="24" viewBox="0 0 24 24"></svg>
Begin cell
</a>
<div class="dropdown-divider"></div>
<a href="#" id="wall-btn" class="dropdown-item">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor"
class="bi bi-square-fill border border-white rounded wall-node" viewBox="0 0 24 24">
</svg>
Wall cell
</a>
<div class="dropdown-divider"></div>
<a href="#" id="exit-btn" class="dropdown-item">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor"
class="bi bi-square-fill border border-white rounded exit-node bg-white" viewBox="0 0 24 24">
</svg>
Exit cell
</a>
<div class="dropdown-divider"></div>
<a href="#" id="empty-btn" class="dropdown-item">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor"
class="bi bi-square-fill border border-white rounded empty-node bg-white" viewBox="0 0 24 24">
</svg>
Empty cell
</a>
</div>
</li>
<!-- Options dropdown -->
<li class=" nav-item dropdown px-3">
<a href="#" class=" text-dark nav-link dropdown-toggle border-bottom border-white" id="options-dropdown"
role="a" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Options
</a>
<div class="dropdown-menu dropdown-menu-dark" aria-labelledby="options-dropdown">
<!-- Drawing thickness -->
<div class=" dropdown-item d-flex flex-wrap" data-toggle="tooltip"
title="Amount of square to draw at the same time.">
<label id="thickness_label" class="form-label mr-auto p-2 my-auto">Thickness:</label>
<label id="thickness_label_value" class="form-label p-2 my-auto">1</label>
<br>
<input id="thickness" type="range" class="form-range p-2 my-auto" name="thickness" min=1 max=5 value=1>
</div>
<!-- Board rows -->
<div class="dropdown-divider"></div>
<div class="dropdown-item d-flex" data-toggle="tooltip"
title="Number of rows that the board will have. Columns = Rows * 2">
<div class="form-label my-auto mr-auto p-2">
<label id="boardrows_label" class="">Rows:</label>
<span class="warning-info">*Max: <span id="max-rows-label">100</span></span>
</div>
<input id="boardrows" type="number" class="form-control w-auto p-2" name="boardrows" min=3 max=100
value=50>
</div>
<!-- Animation delay -->
<div class="dropdown-divider"></div>
<div class=" dropdown-item d-flex flex-wrap" data-toggle="tooltip"
title="Time spent between every explored square.">
<label id="animation-delay_label" class="form-label mr-auto p-2 my-auto">Delay (ms):</label>
<label id="animation-delay_label_value" class="form-label p-2 my-auto">1</label>
<br>
<input id="animation-delay" type="range" class="form-range p-2 my-auto" name="animation-delay" min=0 max=0
value=0 step=1>
</div>
</div>
</li>
<!-- Clear map -->
<li class="nav-item" data-toggle="tooltip" title="Run the selected algorithm.">
<a href="#" id="clear-map-btn" class="btn-danger rounded px-3 text-dark nav-link">Clear map</a>
</li>
<li>
</li>
</ul>
</div>
</nav>
<!-- Board -->
<table id="board"></table>
<!-- Path finding -->
<script src="src/constants.ts"></script>
<script src="index.ts"></script>
<!-- Bootstrap -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
</body>
</html>