-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.html
146 lines (135 loc) · 7 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
<!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">
<!-- Github stuff -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Raleway:wght@500&display=swap" rel="stylesheet">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<!-- P5.js -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.dom.min.js"></script>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.sound.min.js"></script>
<title>Path Finder</title>
</head>
<body style="font-family: 'Raleway', sans-serif;">
<!-- <button id="somebutton" type="button" class="btn btn-success" onclick="start()">Start</button> -->
<div class="container-fluid w-100 m-0 p-0" style="height: 100vh;">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container">
<a class="navbar-brand" href="https://khalidsaifullaah.github.io/pathfinding-visualizer/">
<h3><strong>Path Finder</strong></h3>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-center" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto nav-fill w-100 align-items-center">
<li class="nav-item dropdown active">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
Algorithms
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#" onclick="dropdown(event)">A* Search</a>
<a class="dropdown-item" href="#" onclick="dropdown(event)">Dijkstra</a>
<a class="dropdown-item" href="#" onclick="dropdown(event)">Breadth First Search</a>
<a class="dropdown-item" href="#" onclick="dropdown(event)">Depth First Search</a>
<a class="dropdown-item" href="#" onclick="dropdown(event)">Greedy Best First Search</a>
</div>
</li>
<li class="nav-item">
<button class="btn btn-dark my-2 my-sm-0" id="startButton" type="submit">Start</button>
</li>
<li class="nav-item active">
<a class="nav-link" href="#" onclick="throwObstacles()">Throw Obstacles<span
class="sr-only">(current)</span></a>
</li>
<li class="nav-item active">
<a class="nav-link" href="#" onclick="resetCanvas()">Clear<span class="sr-only">(current)</span></a>
</li>
<div class="row justify-content-end text-center">
<div class="col-12"><p class="p-0 m-0" style="font-size: 10px;">by <span style="font-size: 12px; color: black; font-weight: bolder; letter-spacing: 5px; text-shadow: 2px 2px 5px black;"><a style="color: black; text-decoration: none;" href="https://github.com/khalidsaifullaah"><KHAL/D></a></span></p></div>
<!-- <div class="col text-center align-self-center">
<a class="github-button" href="https://github.com/ntkme/github-buttons" data-color-scheme="no-preference: dark; light: dark; dark: dark;" aria-label="Star ntkme/github-buttons on GitHub">Star</a></div> -->
<div class="col text-center">
<a class="github-button" href="https://github.com/khalidsaifullaah/pathfinding-visualizer" data-color-scheme="no-preference: dark; light: dark; dark: dark;" aria-label="Star ntkme/github-buttons on GitHub">Star</a></div>
</div>
</ul>
</div>
</div>
</nav>
<div class="container-fluid pt-4 pb-0">
<div class="row text-center" style="font-size: 23px;">
<div class="col-sm-6 col-md">
<div>
<span class="square"
style="height:20px; width:20px; background-color:rgb(87,50,168); display: inline-block;"></span>
Source
</div>
</div>
<div class="col-sm-6 col-md">
<div>
<span class="square"
style="height:20px; width:20px; background-color:rgb(140,68,20); display: inline-block;"></span>
Destination
</div>
</div>
<div class="col-sm-6 col-md">
<div>
<span class="square"
style="height:20px; width:20px; background-color:rgb(128,128,128); display: inline-block;"></span>
Obstacles
</div>
</div>
<div class="col-sm-6 col-md">
<div>
<span class="square"
style="height:20px; width:20px; background-color:rgb(45, 196, 129); display: inline-block;"></span>
Unxplored Nodes
</div>
</div>
<div class="col-sm-6 col-md">
<div>
<span class="square"
style="height:20px; width:20px; background-color:rgb(255, 205, 205); display: inline-block;"></span>
Explored Nodes
</div>
</div>
<div class="col-sm-6 col-md">
<div>
<span class="square"
style="height:5px; width:30px; background-color:rgb(255, 0, 200); display: inline-block;"></span>
Path
</div>
</div>
</div>
<div class="row align-items-center" style="min-height: 60px;">
<div class="col text-center">
<span id="message" style="font-style: italic;"></span>
</div>
</div>
</div>
<div id="sketch01" style="position: relative;"> </div>
</div>
<!-- Optional JavaScript -->
<script type="text/javascript" src="sketch.js"></script>
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<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>