Skip to content

Commit e40b8d6

Browse files
committed
side menu algorithms animation
1 parent 4600a1c commit e40b8d6

9 files changed

+42
-12
lines changed

css/stylesheet.css

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ a {
4040

4141
.btn,
4242
button {
43+
cursor: pointer;
4344
vertical-align: top;
4445
border: none;
4546
height: 100%;
@@ -57,7 +58,6 @@ button {
5758
.btn:hover,
5859
button:hover {
5960
background: rgba(0, 0, 0, .15);
60-
cursor: pointer;
6161
}
6262

6363
.btn.active,
@@ -155,14 +155,29 @@ nav h3 {
155155
width: 100%;
156156
height: 30px;
157157
text-align: left;
158+
background: rgba(0, 0, 0, .15);
159+
}
160+
161+
.sidemenu button:hover {
162+
background: rgb(63, 63, 63);
163+
}
164+
165+
.sidemenu button.active {
166+
background: rgb(38, 38, 38);
167+
}
168+
169+
.sidemenu button.active:hover {
170+
background: rgb(38, 38, 38);
158171
}
159172

160173
.sidemenu button.indent {
161174
padding-left: 28px;
162175
}
163176

164177
.sidemenu .algorithms {
165-
box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.36), inset 0 -2px 2px rgba(0, 0, 0, 0.24);
178+
padding: 3px;
179+
display: none;
180+
box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.48), inset 0 -2px 2px rgba(0, 0, 0, 0.36);
166181
}
167182

168183
.workspace {

js/dom/add_categories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ const addCategoryToDOM = (category) => {
3737
$category.click(function () {
3838
const $self = $(this);
3939
$self.toggleClass('open');
40-
$self.next().toggleClass('collapse');
4140
$self.find('i.fa').toggleClass('fa-caret-right fa-caret-down');
41+
$self.next().toggle(300);
4242
});
4343

4444
const $algorithms = $('<div class="algorithms collapse">');

js/dom/setup/setup_side_menu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ module.exports = () => {
4242
showAlgorithm(category, algorithm, data);
4343
});
4444
});
45-
};
45+
};

public/algorithm_visualizer.css

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ a {
160160

161161
.btn,
162162
button {
163+
cursor: pointer;
163164
vertical-align: top;
164165
border: none;
165166
height: 100%;
@@ -177,7 +178,6 @@ button {
177178
.btn:hover,
178179
button:hover {
179180
background: rgba(0, 0, 0, .15);
180-
cursor: pointer;
181181
}
182182

183183
.btn.active,
@@ -275,14 +275,29 @@ nav h3 {
275275
width: 100%;
276276
height: 30px;
277277
text-align: left;
278+
background: rgba(0, 0, 0, .15);
279+
}
280+
281+
.sidemenu button:hover {
282+
background: rgb(63, 63, 63);
283+
}
284+
285+
.sidemenu button.active {
286+
background: rgb(38, 38, 38);
287+
}
288+
289+
.sidemenu button.active:hover {
290+
background: rgb(38, 38, 38);
278291
}
279292

280293
.sidemenu button.indent {
281294
padding-left: 28px;
282295
}
283296

284297
.sidemenu .algorithms {
285-
box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.36), inset 0 -2px 2px rgba(0, 0, 0, 0.24);
298+
padding: 3px;
299+
display: none;
300+
box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.48), inset 0 -2px 2px rgba(0, 0, 0, 0.36);
286301
}
287302

288303
.workspace {

public/algorithm_visualizer.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/algorithm_visualizer.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/algorithm_visualizer.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/algorithm_visualizer.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/algorithm_visualizer.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)