added sidebar

This commit is contained in:
Jacob Levine
2019-02-06 16:08:28 -06:00
parent 0d481b01df
commit 19a236251a
3 changed files with 89 additions and 14 deletions

View File

@@ -204,3 +204,16 @@ function upProfileInfo() {
handleSignedOutUser();
}
}
/* Set the width of the side navigation to 250px and the left margin of the page content to 250px and add a black background color to body */
function openNav() {
document.getElementById("mySidenav").style.width = "250px";
document.getElementById("main").style.marginLeft = "250px";
document.body.style.backgroundColor = "rgba(0,0,0,0.4)";
}
/* Set the width of the side navigation to 0 and the left margin of the page content to 0, and the background color of body to white */
function closeNav() {
document.getElementById("mySidenav").style.width = "0";
document.getElementById("main").style.marginLeft = "0";
document.body.style.backgroundColor = "white";
}