Remove container div

This commit is contained in:
saberzero1 2024-10-26 12:26:43 +02:00
parent 316a993fed
commit 979d653b1a
No known key found for this signature in database
GPG Key ID: 41AEE99107640F10
2 changed files with 296 additions and 287 deletions

View File

@ -84,7 +84,6 @@ export default ((userOpts?: Partial<Options>) => {
constructFileTree(allFiles, (fileData.filePath ?? "").replaceAll(" ", "-")) constructFileTree(allFiles, (fileData.filePath ?? "").replaceAll(" ", "-"))
} }
return ( return (
<div class="explorer-container">
<div class={classNames(displayClass, "explorer")}> <div class={classNames(displayClass, "explorer")}>
<button <button
type="button" type="button"
@ -148,7 +147,6 @@ export default ((userOpts?: Partial<Options>) => {
</ul> </ul>
</div> </div>
</div> </div>
</div>
) )
} }

View File

@ -1,35 +1,42 @@
@use "../../styles/variables.scss" as *; @use "../../styles/variables.scss" as *;
.explorer-container { .explorer {
overflow-y: hidden;
@media all and ($mobile) { @media all and ($mobile) {
order: -1; order: -1;
height: initial;
overflow: hidden;
} }
.explorer {
display: flex; display: flex;
button#mobile-explorer { button#mobile-explorer {
display: none; display: none;
} }
button#desktop-explorer { button#desktop-explorer {
display: flex; display: flex;
} }
@media all and ($mobile) { @media all and ($mobile) {
button#mobile-explorer { button#mobile-explorer {
display: flex; display: flex;
} }
button#desktop-explorer { button#desktop-explorer {
display: none; display: none;
} }
} }
height: 100%; height: 100%;
flex-direction: column; flex-direction: column;
overflow-y: hidden; overflow-y: hidden;
&.desktop-only { &.desktop-only {
@media all and not ($mobile) { @media all and not ($mobile) {
display: flex; display: flex;
} }
} }
/*&:after { /*&:after {
pointer-events: none; pointer-events: none;
content: ""; content: "";
@ -113,12 +120,14 @@
max-height 0.35s ease, max-height 0.35s ease,
transform 0.35s ease, transform 0.35s ease,
opacity 0.2s ease; opacity 0.2s ease;
& li > a { & li > a {
color: var(--dark); color: var(--dark);
opacity: 0.75; opacity: 0.75;
pointer-events: all; pointer-events: all;
} }
} }
> #explorer-ul { > #explorer-ul {
max-height: none; max-height: none;
} }
@ -212,7 +221,7 @@
background-color: var(--light); background-color: var(--light);
max-width: 100dvw; max-width: 100dvw;
left: -100dvw; left: -100dvw;
width: 100dvw; width: 100%;
transition: all 300ms ease-in-out; transition: all 300ms ease-in-out;
overflow: hidden; overflow: hidden;
padding: 2rem 2rem 4rem; padding: 2rem 2rem 4rem;
@ -222,7 +231,6 @@
visibility: visible; visibility: visible;
&:not(.collapsed) { &:not(.collapsed) {
//height: 100dvh;
left: 0; left: 0;
} }
@ -232,7 +240,6 @@
} }
&.collapsed { &.collapsed {
//height: 0;
left: -100dvw; left: -100dvw;
visibility: visible; visibility: visible;
} }
@ -240,13 +247,16 @@
#mobile-explorer { #mobile-explorer {
margin: 5px; margin: 5px;
&:not(.collapsed) .lucide-menu { &:not(.collapsed) .lucide-menu {
transform: rotate(90deg); transform: rotate(-90deg);
transition: transform 200ms ease-in-out; transition: transform 200ms ease-in-out;
} }
.lucide-menu { .lucide-menu {
stroke: var(--darkgray); stroke: var(--darkgray);
transition: transform 200ms ease; transition: transform 200ms ease;
&:hover { &:hover {
stroke: var(--dark); stroke: var(--dark);
} }
@ -269,16 +279,17 @@
opacity: 1 !important; opacity: 1 !important;
overflow: auto !important; overflow: auto !important;
} }
html:has(.no-scroll) { html:has(.no-scroll) {
overflow: auto !important; overflow: auto !important;
} }
} }
}
// Lock page scroll on mobile // Lock page scroll on mobile
.lock-scroll { .lock-scroll {
position: static; position: static;
} }
@media all and ($mobile) { @media all and ($mobile) {
.lock-scroll { .lock-scroll {
position: fixed; position: fixed;