|
1 | 1 | <script lang="ts"> |
2 | 2 | import { navigating } from "$app/state"; |
3 | | - import { LoaderCircle, Menu } from "@lucide/svelte"; |
| 3 | + import { LoaderCircle } from "@lucide/svelte"; |
4 | 4 | import semver from "semver"; |
5 | 5 | import ReleaseCard from "./ReleaseCard.svelte"; |
6 | | - import SidePanel from "./SidePanel.svelte"; |
7 | | - import * as Accordion from "$lib/components/ui/accordion"; |
8 | | - import * as Sheet from "$lib/components/ui/sheet"; |
9 | | - import { Button } from "$lib/components/ui/button"; |
10 | 6 | import { Skeleton } from "$lib/components/ui/skeleton"; |
| 7 | + import * as Accordion from "$lib/components/ui/accordion"; |
11 | 8 |
|
12 | 9 | let { data } = $props(); |
13 | 10 | let latestRelease = $derived( |
|
27 | 24 | </script> |
28 | 25 |
|
29 | 26 | {#snippet loading()} |
30 | | - <div class="my-8 space-y-2"> |
31 | | - <Skeleton class="h-16 w-64" /> |
32 | | - <Skeleton class="h-8 w-32" /> |
33 | | - </div> |
34 | | - <div class="flex gap-8"> |
| 27 | + <div class="flex flex-col"> |
| 28 | + <div class="my-8 space-y-2"> |
| 29 | + <Skeleton class="h-16 w-64" /> |
| 30 | + <Skeleton class="h-8 w-32" /> |
| 31 | + </div> |
35 | 32 | <div class="relative w-full space-y-2"> |
36 | 33 | <p |
37 | 34 | class="absolute top-18 left-1/2 z-10 inline-flex -translate-x-1/2 -translate-y-1/2 items-center justify-center text-xl" |
|
44 | 41 | <Skeleton class="h-16 w-full" /> |
45 | 42 | <Skeleton class="h-80 w-full" /> |
46 | 43 | </div> |
47 | | - <Skeleton class="hidden h-96 w-140 lg:block" /> |
48 | 44 | </div> |
49 | 45 | {/snippet} |
50 | 46 |
|
|
58 | 54 | {@const displayableReleases = data.releases.filter(release => |
59 | 55 | showPrereleases ? true : !release.prerelease |
60 | 56 | )} |
61 | | - <div class="my-8 flex gap-8"> |
62 | | - <div> |
| 57 | + <div class="flex flex-col"> |
| 58 | + <div class="my-8"> |
63 | 59 | <h1 class="text-3xl font-semibold text-primary text-shadow-sm md:text-5xl"> |
64 | 60 | <!-- eslint-disable-next-line svelte/no-at-html-tags --> |
65 | 61 | {@html data.currentPackage.pkg.name.replace(/\//g, "/<wbr />")} |
|
77 | 73 | <h3 class="mt-4 italic">{data.currentPackage.pkg.description}</h3> |
78 | 74 | {/if} |
79 | 75 | </div> |
80 | | - <Sheet.Root> |
81 | | - <Sheet.Trigger> |
82 | | - {#snippet child({ props })} |
83 | | - <Button {...props} variant="secondary" class="ml-auto lg:hidden"> |
84 | | - <Menu /> |
85 | | - <span class="sr-only">Menu</span> |
86 | | - </Button> |
87 | | - {/snippet} |
88 | | - </Sheet.Trigger> |
89 | | - <Sheet.Content class="overflow-y-auto"> |
90 | | - <Sheet.Header> |
91 | | - <Sheet.Title>Packages</Sheet.Title> |
92 | | - </Sheet.Header> |
93 | | - <SidePanel |
94 | | - headless |
95 | | - packageName={data.currentPackage.pkg.name} |
96 | | - allPackages={data.displayablePackages} |
97 | | - otherReleases={data.allReleases} |
98 | | - bind:showPrereleases |
99 | | - class="my-8" |
100 | | - /> |
101 | | - </Sheet.Content> |
102 | | - </Sheet.Root> |
103 | | - </div> |
104 | | - <div class="flex gap-8"> |
105 | 76 | <Accordion.Root |
106 | 77 | type="multiple" |
107 | 78 | value={displayableReleases |
|
139 | 110 | /> |
140 | 111 | {/each} |
141 | 112 | </Accordion.Root> |
142 | | - <SidePanel |
143 | | - packageName={data.currentPackage.pkg.name} |
144 | | - allPackages={data.displayablePackages} |
145 | | - otherReleases={data.allReleases} |
146 | | - class="hidden h-fit w-140 lg:block" |
147 | | - bind:showPrereleases |
148 | | - /> |
149 | 113 | </div> |
150 | 114 | {/await} |
151 | 115 | {/if} |
0 commit comments