diff --git a/index.html b/index.html index 366cd63..e593b9d 100644 --- a/index.html +++ b/index.html @@ -98,11 +98,16 @@ - Lisbook + Lisbook - - Home + + + + + + + Home Next Previous @@ -200,12 +205,22 @@ Share Your Thoughts const playlistItems = document.querySelectorAll('#playlist li'); const audioPlayer = document.getElementById('audio-player'); const themeToggle = document.getElementById('theme-toggle'); + const menuToggle = document.getElementById("menu-toggle"); + const menuClose = document.getElementById("menu-close"); + const menu = document.getElementById("menu"); const body = document.body; // Theme toggle themeToggle.addEventListener('click', function() { body.classList.toggle('light-theme'); body.classList.toggle('dark-theme'); + if (body.classList.contains("light-theme")) { + menu.classList.remove("bg-gray-900", "text-gray-300"); + menu.classList.add("bg-gray-100", "text-gray-800"); + } else { + menu.classList.remove("bg-gray-100", "text-gray-800"); + menu.classList.add("bg-gray-900", "text-gray-300"); + } }); // Playlist interaction @@ -237,9 +252,14 @@ ${username} }); // Mobile menu toggle - document.getElementById('menu-toggle').addEventListener('click', function () { - const menu = document.getElementById('menu'); - menu.classList.toggle('hidden'); + menuToggle.addEventListener("click", () => { + menu.classList.remove("scale-0"); + menu.classList.add("scale-100"); + }); + + menuClose.addEventListener("click", () => { + menu.classList.add("scale-0"); + menu.classList.remove("scale-100"); }); });