diff --git a/script.js b/script.js index 2cd7df86..d4927b2b 100644 --- a/script.js +++ b/script.js @@ -65,5 +65,22 @@ window.onload = () => { themeToggle.checked = true; } }; +// Toggle the sidebar visibility +function toggleSidebar() { + const sidebar = document.querySelector('.social-sidebar'); + const toggleArrow = document.querySelector('.toggle-arrow'); + + // Check if the sidebar is currently visible + if (sidebar.style.display === "none") { + // If hidden, show the sidebar and hide the toggle arrow + sidebar.style.display = "block"; + toggleArrow.style.display = "none"; + } else { + // If visible, hide the sidebar and show the toggle arrow + sidebar.style.display = "none"; + toggleArrow.style.display = "block"; + } +} +