fix: sync CSS classes with refactored layout, restore missing sidebar items, add asset versioning, fix routes and auth
This commit is contained in:
@@ -12,14 +12,6 @@
|
||||
|
||||
const sidebar = document.getElementById('sidebar');
|
||||
const sidebarToggle = document.getElementById('sidebarToggle');
|
||||
const mobileToggle = document.getElementById('mobileToggle');
|
||||
const mobileOverlay = document.getElementById('mobileOverlay');
|
||||
|
||||
function closeMobileSidebar() {
|
||||
if (!sidebar) return;
|
||||
sidebar.classList.remove('mobile-open');
|
||||
if (mobileOverlay) mobileOverlay.classList.remove('active');
|
||||
}
|
||||
|
||||
if (sidebarToggle && sidebar) {
|
||||
sidebarToggle.addEventListener('click', function () {
|
||||
@@ -34,35 +26,6 @@
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
if (mobileToggle && sidebar) {
|
||||
mobileToggle.addEventListener('click', function () {
|
||||
const opening = !sidebar.classList.contains('mobile-open');
|
||||
if (opening) {
|
||||
sidebar.classList.remove('collapsed');
|
||||
sidebar.classList.add('mobile-open');
|
||||
if (mobileOverlay) mobileOverlay.classList.add('active');
|
||||
} else {
|
||||
closeMobileSidebar();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (sidebar) {
|
||||
document.addEventListener('click', function (e) {
|
||||
if (window.innerWidth <= 768 &&
|
||||
sidebar.classList.contains('mobile-open') &&
|
||||
!sidebar.contains(e.target) &&
|
||||
e.target !== mobileToggle &&
|
||||
e.target !== mobileOverlay) {
|
||||
closeMobileSidebar();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (mobileOverlay) {
|
||||
mobileOverlay.addEventListener('click', closeMobileSidebar);
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Theme Toggle
|
||||
========================================================================== */
|
||||
|
||||
Reference in New Issue
Block a user