mirror of
https://github.com/pheralb/svgl.git
synced 2025-12-29 08:01:36 +08:00
✨ Integrate Lina (ScrollArea and ScrollAreaScrollbar) into sidebar layout for improved scrolling and organization of categories
This commit is contained in:
@@ -4,6 +4,8 @@
|
|||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
import ShowCategories from "@/components/layout/showCategories.svelte";
|
import ShowCategories from "@/components/layout/showCategories.svelte";
|
||||||
import ShowSidebarLinks from "@/components/layout/showSidebarLinks.svelte";
|
import ShowSidebarLinks from "@/components/layout/showSidebarLinks.svelte";
|
||||||
|
import ScrollArea from "@/components/ui/scroll-area/scroll-area.svelte";
|
||||||
|
import ScrollAreaScrollbar from "@/components/ui/scroll-area/scroll-area-scrollbar.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
@@ -11,17 +13,25 @@
|
|||||||
class={cn(
|
class={cn(
|
||||||
"md:fixed md:left-1 md:h-[calc(100vh-4.5rem)]",
|
"md:fixed md:left-1 md:h-[calc(100vh-4.5rem)]",
|
||||||
"overflow-x-hidden",
|
"overflow-x-hidden",
|
||||||
"w-54 pr-2 pl-2",
|
"w-54",
|
||||||
"hidden flex-col space-y-3 md:flex",
|
"hidden flex-col space-y-3 md:flex",
|
||||||
"bg-neutral-100 dark:bg-neutral-950",
|
"bg-neutral-100 dark:bg-neutral-950",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<nav class="flex flex-col space-y-0.5">
|
<nav class="flex flex-col space-y-0.5 px-2">
|
||||||
<ShowSidebarLinks />
|
<ShowSidebarLinks />
|
||||||
</nav>
|
</nav>
|
||||||
<Separator orientation="horizontal" />
|
<div class="px-2">
|
||||||
<nav class="relative flex h-auto flex-col space-y-0.5 overflow-y-auto">
|
<Separator orientation="horizontal" />
|
||||||
<ShowCategories />
|
</div>
|
||||||
|
<nav class="relative flex h-auto flex-col space-y-0.5 overflow-hidden">
|
||||||
|
<ScrollArea
|
||||||
|
maskClassName="before:from-neutral-100 after:from-neutral-100 dark:before:from-neutral-950 dark:after:from-neutral-950"
|
||||||
|
class="flex size-full flex-col gap-y-0.5 overflow-hidden px-2"
|
||||||
|
>
|
||||||
|
<ShowCategories />
|
||||||
|
<ScrollAreaScrollbar orientation="vertical" />
|
||||||
|
</ScrollArea>
|
||||||
</nav>
|
</nav>
|
||||||
</aside>
|
</aside>
|
||||||
<main class={cn("px-2 md:mr-4 md:ml-56 md:px-0", "overflow-hidden")}>
|
<main class={cn("px-2 md:mr-4 md:ml-56 md:px-0", "overflow-hidden")}>
|
||||||
|
|||||||
Reference in New Issue
Block a user