Skip to content

Commit 9f8628f

Browse files
style: improve the look of the list page
1 parent eaf0323 commit 9f8628f

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/routes/package/[...package]/SidePanel.svelte

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
{/if}
5656
<li class="space-y-2">
5757
{#if packages.length > 1}
58-
<h3 class="font-display text-xl font-bold text-primary">{category.name}</h3>
58+
<h3 class="font-display text-xl text-primary">{category.name}</h3>
5959
<ul class="space-y-2">
6060
{#each packages as { pkg } (pkg.name)}
6161
<li>
@@ -78,15 +78,13 @@
7878
{:else}
7979
{@const firstPackageName = packages[0]?.pkg.name ?? ""}
8080
{#if page.url.pathname.endsWith(`/${firstPackageName}`)}
81-
<h3
82-
class="font-display text-xl font-bold text-primary underline underline-offset-4"
83-
>
81+
<h3 class="font-display text-xl text-primary underline underline-offset-4">
8482
{category.name}
8583
</h3>
8684
{:else}
8785
<a
8886
href="/package/{firstPackageName}"
89-
class="group inline-flex w-full items-center font-display text-xl font-bold text-primary underline-offset-4 hover:underline"
87+
class="group inline-flex w-full items-center font-display text-xl text-primary underline-offset-4 hover:underline"
9088
>
9189
{category.name}
9290
<ChevronRight

src/routes/packages/+page.svelte

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<ul class="space-y-8">
99
{#each data.displayablePackages as { category, packages } (category)}
1010
<li>
11-
<h3 class="text-2xl font-bold text-primary">{category.name}</h3>
11+
<h3 class="font-display text-3xl text-primary">{category.name}</h3>
1212
<ul class="mt-2">
1313
{#each packages as { owner, repoName, pkg }, index (pkg.name)}
1414
{#if index > 0}
@@ -17,15 +17,19 @@
1717
<li>
1818
<a
1919
href="/package/{pkg.name}"
20-
class="group flex items-center rounded-lg px-4 py-3 transition-colors hover:bg-neutral-800"
20+
class="group flex items-center rounded-xl px-4 py-3 transition-colors hover:bg-neutral-800"
2121
>
2222
<div class="flex flex-col">
2323
<h4 class="font-medium">{pkg.name}</h4>
24-
{#if category.slug === "others"}
25-
<span class="text-muted-foreground">
24+
<span class="text-muted-foreground">
25+
{pkg.description}
26+
<span class="font-bold">
27+
{#if pkg.description}
28+
29+
{/if}
2630
{owner}/{repoName}
2731
</span>
28-
{/if}
32+
</span>
2933
</div>
3034
<ChevronRight class="mr-1 ml-auto transition-transform group-hover:translate-x-1" />
3135
</a>

0 commit comments

Comments
 (0)