-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
176 lines (157 loc) · 6.47 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>QuickSort-Visualizer</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Links -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css"
integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous" />
<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" />
<link rel="stylesheet" href="style.css" />
<link rel="icon" href="ascending-sort.svg" />
</head>
<body>
<nav id="sm-screen" class="navbar navbar-expand-lg navbar-dark bg-dark" style="position: absolute">
<a class="navbar-brand" style="color: white">Quick-Sort Visualizer</a>
<button style="float: right; margin-right: 8px" 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" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Random Input
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<span class="badge badge-pill badge-secondary mx-2" style="font-size: 15px">Size
</span>
<input id="navrandomSzIpt" placeholder="Size (Optional)" type="number" />
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Custom Input
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<span class="badge badge-pill badge-secondary mx-2" style="font-size: 15px">Array
</span>
<input id="navCustomEleIpt" placeholder="Enter with ',' " style="margin-left: 2px" />
</div>
</li>
<li class="nav-item dropdown my-2">
<div aria-labelledby="navbarDropdown">
<button class="btn btn-primary btn-sm mx-1 shuffleBtn" style="font-size: 15px">
Shuffle
</button>
<button class="btn btn-success btn-sm mx-1" id="navVisualBtn" style="font-size: 15px">
Visualize
</button>
<button class="btn btn-danger btn-sm mx-1" id="navgenArr" onclick="generate()">
Generate
</button>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
<button type="button" class="btn btn-secondary mx-1" onclick="changeSpeed1()">
<< </button>
<span class="badge badge-pill badge-warning mx-3" id="speedElement">
Speed
</span>
<button type="button" class="btn btn-secondary mx-1" onclick="changeSpeed3()">
>>
</button>
</a>
</li>
</ul>
</div>
</nav>
<!-- -->
<div class="tools">
<div class="customSection">
<h4 id="customHeading">
<span class="badge badge-pill badge-dark">Custom Input</span>
</h4>
<span id="customEle" style="font-size: 20px" class="badge badge-pill badge-secondary">Array
</span>
<input type="text" id="customEleIpt" placeholder="Enter elements with ','" />
</div>
<div class="randomSection">
<h4 id="randomHeading">
<span class="badge badge-pill badge-dark">Random Input</span>
</h4>
<span style="font-size: 20px" class="badge badge-pill badge-secondary">Size
</span>
<input type="number" id="randomSzIpt" placeholder="Size (Optional)" />
</div>
<div id="btnSection">
<button class="btn btn-sm btn-primary" id="genArr" onclick="generate()">
Generate Random Array
</button>
<button class="btn btn-sm btn-success shuffleBtn">
Shuffle Array
</button>
<button class="btn btn-sm btn-danger" id="visualBtn">
Visualise
</button>
</div>
<div class="speed">
<h3>
<span class="badge badge-pill badge-warning" id="speedElement">
Speed
<span id="ms"> (ms)</span></span>
<span id="counter" class="badge badge-pill badge-light">700</span>
</h3>
<div class="btn-toolbar" id="toolbar1" role="toolbar" aria-label="Toolbar with button groups">
<div class="btn-group mr-2" role="group" aria-label="First group">
<button type="button" class="btn btn-secondary" onclick="changeSpeed1()">
Low
</button>
</div>
<div class="btn-group" role="group" aria-label="Third group">
<button type="button" class="btn btn-secondary" onclick="changeSpeed3()">
High
</button>
</div>
</div>
<!-- For Media Query -->
<div class="btn-toolbar" id="toolbar2" role="toolbar" aria-label="Toolbar with button groups">
<div class="btn-group mr-2" role="group" aria-label="First group">
<button type="button" class="btn btn-secondary" onclick="changeSpeed1()">
-
</button>
</div>
<div class="btn-group" role="group" aria-label="Third group">
<button type="button" class="btn btn-secondary" onclick="changeSpeed3()">
+
</button>
</div>
</div>
</div>
<!-- For Media query -->
<div id="control" class="btn-group btn-group-sm" role="group" aria-label="Basic example">
<button type="button" class="btn btn-secondary" onclick="changeSpeed1()">
<< </button>
<button type="button" class="btn btn-secondary" onclick="changeSpeed3()">
>>
</button>
</div>
</div>
<div id="canvas"></div>
<!-- Script for Javascript -->
<script defer="" src="sketch.js"></script>
<script defer="" src="libraries/p5.min.js"></script>
<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>