make the sidebar disappear when you click category links

This commit is contained in:
Lazy Hippopotamus
2023-07-15 11:36:02 -04:00
parent 42693b20fe
commit 8ca034de16
3 changed files with 5 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ if (window.location.hash == "#TCAS_sc1") {
left: 0,
behavior: "smooth"
});
sidebar_off();
}
else if (window.location.hash.startsWith("#TCAS_fya:")) {
document.getElementById("content").innerHTML = "<p>" + decodeURI(window.location.hash.substring(10)) + "</p>";
@@ -205,6 +206,6 @@ function toggle_sidebar() {
}
function sidebar_off() {
//document.body.classList.remove("sidebar-opened");
//el.src = "res/arrow-none.svg";
document.body.classList.remove("sidebar-opened");
document.querySelector("#sider > img").src = "res/arrow-right.svg";
}