UI: fix overflow behavior sidebar

This commit is contained in:
Johannes Kirschbauer
2024-11-22 21:56:38 +01:00
parent f448897420
commit 0b3b98e9d4
3 changed files with 14 additions and 5 deletions

View File

@@ -6,6 +6,15 @@
@import "./sidebar-profile";
/* Sidebar Structure */
.sidebar {
min-width: theme(width.72);
height: 100%;
background-color: var(--clr-bg-inv-2);
border: 1px solid var(--clr-border-inv-2);
border-radius: theme(borderRadius.xl);
}
.sidebar__body {
display: flex;
flex-direction: column;

View File

@@ -56,14 +56,14 @@ export const Sidebar = (props: RouteSectionProps) => {
}));
return (
<>
<div class="sidebar opacity-95">
<Show
when={query.data}
fallback={<SidebarHeader clanName={"Untitled"} />}
>
{(meta) => <SidebarHeader clanName={meta().name} />}
</Show>
<div class="sidebar__body overflow-y-scroll">
<div class="sidebar__body max-h-[calc(100vh-4rem)] overflow-scroll">
<For each={routes.filter((r) => !r.hidden && r.path != "/clans")}>
{(route: AppRoute) => (
<Show
@@ -90,6 +90,6 @@ export const Sidebar = (props: RouteSectionProps) => {
)}
</For>
</div>
</>
</div>
);
};