fix selectors for explorer

This commit is contained in:
Tejas Sanap 2024-08-11 20:49:20 +01:00
parent 195fc5134c
commit bb6ccfeba8
No known key found for this signature in database
GPG Key ID: DD8C7759CA107D93
2 changed files with 39 additions and 38 deletions

View File

@ -54,9 +54,8 @@ function toggleFolder(evt: MouseEvent) {
}
function setupExplorer() {
const explorer = document.getElementById("explorer")
if (!explorer) return
const buttons = document.querySelectorAll("button#explorer") as NodeListOf<HTMLButtonElement>
for (const explorer of buttons) {
if (explorer.dataset.behavior === "collapse") {
for (const item of document.getElementsByClassName(
"folder-button",
@ -100,6 +99,7 @@ function setupExplorer() {
setFolderState(folderUl, folderState.collapsed)
}
})
}
}
window.addEventListener("resize", setupExplorer)

View File

@ -192,6 +192,7 @@ a {
& .sidebar.right {
right: calc(calc(100vw - $pageWidth) / 2 - $sidePanelWidth);
flex-wrap: wrap;
flex-direction: column;
& > * {
@media all and (max-width: $fullPageWidth) {
flex: 1;