make the sidebar disappear when you click category links
This commit is contained in:
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
<!-- Meta Tags Generated via https://www.opengraph.xyz -->
|
<!-- Meta Tags Generated via https://www.opengraph.xyz -->
|
||||||
</head>
|
</head>
|
||||||
<body onclick="sidebar_off()" class="sidebar-opened">
|
<body onclick="" class="sidebar-opened">
|
||||||
<svg width="0" height="0"> <!-- clip paths for the sidebar -->
|
<svg width="0" height="0"> <!-- clip paths for the sidebar -->
|
||||||
<defs>
|
<defs>
|
||||||
<clipPath id="design-2" clipPathUnits="objectBoundingBox">
|
<clipPath id="design-2" clipPathUnits="objectBoundingBox">
|
||||||
|
|||||||
1
main.css
1
main.css
@@ -224,6 +224,7 @@ body:not(.sidebar-opened) > #sider-outer > #sider > img {
|
|||||||
right: 0px;
|
right: 0px;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
|
z-index: 100000000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hidden {
|
.hidden {
|
||||||
|
|||||||
5
main.js
5
main.js
@@ -6,6 +6,7 @@ if (window.location.hash == "#TCAS_sc1") {
|
|||||||
left: 0,
|
left: 0,
|
||||||
behavior: "smooth"
|
behavior: "smooth"
|
||||||
});
|
});
|
||||||
|
sidebar_off();
|
||||||
}
|
}
|
||||||
else if (window.location.hash.startsWith("#TCAS_fya:")) {
|
else if (window.location.hash.startsWith("#TCAS_fya:")) {
|
||||||
document.getElementById("content").innerHTML = "<p>" + decodeURI(window.location.hash.substring(10)) + "</p>";
|
document.getElementById("content").innerHTML = "<p>" + decodeURI(window.location.hash.substring(10)) + "</p>";
|
||||||
@@ -205,6 +206,6 @@ function toggle_sidebar() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function sidebar_off() {
|
function sidebar_off() {
|
||||||
//document.body.classList.remove("sidebar-opened");
|
document.body.classList.remove("sidebar-opened");
|
||||||
//el.src = "res/arrow-none.svg";
|
document.querySelector("#sider > img").src = "res/arrow-right.svg";
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user