We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2966fc1 commit 14aef62Copy full SHA for 14aef62
_javascript/modules/layouts/sidebar.js
@@ -1,6 +1,7 @@
1
const ATTR_DISPLAY = 'sidebar-display';
2
const $sidebar = document.getElementById('sidebar');
3
const $trigger = document.getElementById('sidebar-trigger');
4
+const $icon = $trigger.querySelector('i');
5
const $mask = document.getElementById('mask');
6
7
class SidebarUtil {
@@ -10,6 +11,8 @@ class SidebarUtil {
10
11
this.#isExpanded = !this.#isExpanded;
12
document.body.toggleAttribute(ATTR_DISPLAY, this.#isExpanded);
13
$sidebar.classList.toggle('z-2', this.#isExpanded);
14
+ $icon.classList.toggle('fa-bars', !this.#isExpanded);
15
+ $icon.classList.toggle('fa-close', this.#isExpanded);
16
$mask.classList.toggle('d-none', !this.#isExpanded);
17
}
18
0 commit comments