-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
30 lines (28 loc) · 1.11 KB
/
Copy pathscript.js
File metadata and controls
30 lines (28 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function togglesidebar() {
const sidebarWhole =document.getElementById("sidebar");
const sidebarButtonsAll = document.getElementById ("SidebarUl");
const LogoLink = document.getElementsByClassName ("logo-link")[0];
if (sidebarButtonsAll.style.transform === "translateX(-120%)")
{
LogoLink.style.borderRadius = "0%";
LogoLink.style.width = "215px";
LogoLink.style.height = "90px";
LogoLink.style.backgroundPosition = "35% 31.8%";
LogoLink.style.backgroundSize = "105%" ;
LogoLink.style.border = "none"
sidebarButtonsAll.style.transform = "translateX(0%)";
sidebarWhole.style.width = "230px";
console.log("sidebar shown");
}
else{
LogoLink.style.borderRadius = "50%";
LogoLink.style.width = "50px";
LogoLink.style.height = "50px";
LogoLink.style.backgroundPosition = "7% 28.8%";
LogoLink.style.backgroundSize = "255%" ;
LogoLink.style.border = "white 1px solid "
sidebarButtonsAll.style.transform = "translateX(-120%)";
sidebarWhole.style.width = 0;
console.log("sidebar hidden");
}
}