From 0723137efd50cdc071a0fee3f13361ad76f644c7 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Mon, 10 Jun 2024 21:52:51 +0200 Subject: [PATCH] fix: re-add js for mobile-sidebar --- index.php | 1 + js/mobile-sidebar.js | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 js/mobile-sidebar.js diff --git a/index.php b/index.php index 2d4b670..44409a8 100755 --- a/index.php +++ b/index.php @@ -45,6 +45,7 @@ + diff --git a/js/mobile-sidebar.js b/js/mobile-sidebar.js new file mode 100644 index 0000000..af794f0 --- /dev/null +++ b/js/mobile-sidebar.js @@ -0,0 +1,10 @@ +document.getElementById('mobile-button').addEventListener('click', function () { + const sidebar = document.getElementById('mobile-sidebar'); + if (sidebar.classList.contains('hidden')) { + sidebar.classList.remove('hidden'); + sidebar.classList.add('shown'); + } else { + sidebar.classList.remove('shown'); + sidebar.classList.add('hidden'); + } +}); \ No newline at end of file