Enable sidebar toggle on desktop

This commit is contained in:
thePR0M3TH3AN
2025-07-10 15:32:25 -04:00
parent 7e6776af0c
commit ae1191ff1e
3 changed files with 29 additions and 0 deletions

View File

@@ -114,3 +114,14 @@ main {
}
body.sidebar-open .sidebar { left: 0; }
}
@media (min-width: 769px) {
.sidebar {
transition: width 0.2s ease;
}
body:not(.sidebar-open) .sidebar {
width: 0;
padding: 0;
overflow: hidden;
}
}

View File

@@ -12,6 +12,10 @@ document.addEventListener('DOMContentLoaded', () => {
const stored = localStorage.getItem('theme');
if (stored) setTheme(stored);
if (window.innerWidth > 768) {
document.body.classList.add('sidebar-open');
}
sidebarToggle?.addEventListener('click', () => {
document.body.classList.toggle('sidebar-open');
});