Initial commit
Update .gitignore, LICENSE-CC0, and 70 more files...
This commit is contained in:
18
htdocs/js/sidebar.js
Normal file
18
htdocs/js/sidebar.js
Normal file
@@ -0,0 +1,18 @@
|
||||
let isSidebarVisible = true;
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const eSidebar = document.getElementById("sidebar");
|
||||
const eMain = document.getElementById("main");
|
||||
|
||||
// TODO: Emit an event to help Splide re-align after the sidebar has changed state.
|
||||
document.getElementById("sidebar-toggle-footer").onclick = function() {
|
||||
if(isSidebarVisible) {
|
||||
eSidebar.classList.add("retracted");
|
||||
eMain.classList.add("expanded");
|
||||
} else {
|
||||
eSidebar.classList.remove("retracted");
|
||||
eMain.classList.remove("expanded");
|
||||
}
|
||||
isSidebarVisible = !isSidebarVisible;
|
||||
};
|
||||
});
|
Reference in New Issue
Block a user