init
Deploy Jekyll site to Pages / build (push) Failing after 3m59s

This commit is contained in:
2025-02-27 22:54:37 +01:00
parent d560021845
commit 1e3657f788
176 changed files with 11248 additions and 1 deletions
+22
View File
@@ -0,0 +1,22 @@
/**
* Expand or close the sidebar in mobile screens.
*/
const $sidebar = document.getElementById('sidebar');
const $trigger = document.getElementById('sidebar-trigger');
const $mask = document.getElementById('mask');
class SidebarUtil {
static #isExpanded = false;
static toggle() {
this.#isExpanded = !this.#isExpanded;
document.body.toggleAttribute('sidebar-display', this.#isExpanded);
$sidebar.classList.toggle('z-2', this.#isExpanded);
$mask.classList.toggle('d-none', !this.#isExpanded);
}
}
export function sidebarExpand() {
$trigger.onclick = $mask.onclick = () => SidebarUtil.toggle();
}