diff --git a/src/js/main.js b/src/js/main.js index c3daf7d..58fb2a0 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -42,13 +42,12 @@ function switchTheme() { function toggleSidebar() { let sidebar = document.getElementById('sidebar'); - sidebar.classList.remove('hidden') if ([...sidebar.classList].includes('translate-x-0')) { - document.body.style.setProperty("overflow", "hidden") + document.body.style.removeProperty("overflow") sidebar.classList.remove('translate-x-0') sidebar.classList.add('-translate-x-full') } else { - document.body.style.removeProperty("overflow") + document.body.style.setProperty("overflow", "hidden") sidebar.classList.remove('-translate-x-full') sidebar.classList.add('translate-x-0') } diff --git a/templates/layout.html b/templates/layout.html index 6f2b514..a876498 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -139,7 +139,7 @@ {% endif %} -