diff --git a/public/js/app.js b/public/js/app.js index 063e551..864b82b 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -16,9 +16,7 @@ window.addEventListener('load', function () { } }); -function openMenu() { - document.getElementById('sidebar-nav').dataset.open = 'open'; -} -function closeMenu() { - document.getElementById('sidebar-nav').dataset.open = 'closed'; +function toggleMenu() { + const nav = document.getElementById('sidebar-nav'); + nav.dataset.open = nav.dataset.open === 'open' ? 'closed' : 'open'; } \ No newline at end of file diff --git a/resources/views/layout.gohtml b/resources/views/layout.gohtml index ea2d057..68cc7f6 100644 --- a/resources/views/layout.gohtml +++ b/resources/views/layout.gohtml @@ -17,7 +17,7 @@
-