diff --git a/js/nav.js b/js/nav.js index 6cbf18e..b76e9b7 100644 --- a/js/nav.js +++ b/js/nav.js @@ -1,19 +1,11 @@ -/* When the user clicks on the button, -toggle between hiding and showing the dropdown content */ -function myFunction() { - document.getElementById("myDropdown").classList.toggle("show"); +function sidebarOpen() { + document.getElementById("sidebar").style.width = "50%"; + document.getElementById("sidebar_open_short").style.display = "none"; + document.getElementById("sidebar_close_short").style.display = "block"; } -// Close the dropdown menu if the user clicks outside of it -window.onclick = function(event) { - if (!event.target.matches('.dropbtn')) { - var dropdowns = document.getElementsByClassName("dropdown-content"); - var i; - for (i = 0; i < dropdowns.length; i++) { - var openDropdown = dropdowns[i]; - if (openDropdown.classList.contains('show')) { - openDropdown.classList.remove('show'); - } - } - } -} +function sidebarClose() { + document.getElementById("sidebar").style.width = "0%" + document.getElementById("sidebar_open_short").style.display = "block"; + document.getElementById("sidebar_close_short").style.display = "none"; +} \ No newline at end of file diff --git a/page-blocks/nav-menu.php b/page-blocks/nav-menu.php index b1f141f..bb2d086 100644 --- a/page-blocks/nav-menu.php +++ b/page-blocks/nav-menu.php @@ -1,10 +1,11 @@ -'; -echo ' '; -echo '
'; -echo ''; + + diff --git a/styles/style.css b/styles/style.css index 61b5de6..081d9c6 100644 --- a/styles/style.css +++ b/styles/style.css @@ -117,67 +117,50 @@ body { } /* START MENU STYLE */ - -/* Menu Button */ -.dropbtn { - position: fixed; - top: 0; - right: 0; - background-color: #7fa7e6; - color: white; - padding: 12px; - font-size: 12px; - box-shadow: 0px 4px 4px 0px rgba(0,0,0,0.2); - border: none; - border-bottom-left-radius: 10px; - cursor: pointer; -} - -.dropbtn:hover, .dropbtn:focus { - background-color: #0280e5; -} - -/* The container