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

@@ -40,7 +40,7 @@
<!-- Meta Tags Generated via https://www.opengraph.xyz -->
</head>
<body onclick="sidebar_off()" class="sidebar-opened">
<body onclick="" class="sidebar-opened">
<svg width="0" height="0"> <!-- clip paths for the sidebar -->
<defs>
<clipPath id="design-2" clipPathUnits="objectBoundingBox">

View File

@@ -224,6 +224,7 @@ body:not(.sidebar-opened) > #sider-outer > #sider > img {
right: 0px;
top: 50%;
width: 20px;
z-index: 100000000000;
}
.hidden {

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";
}