mirror of
https://github.com/PR0M3TH3AN/Archivox.git
synced 2025-09-07 14:48:40 +00:00
Enable sidebar toggle on desktop
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -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');
|
||||
});
|
||||
|
Reference in New Issue
Block a user