Skip to content

Commit 235de19

Browse files
refactor: get as close as possible to loaded state
1 parent 254462d commit 235de19

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

app/components/Package/Skeleton.vue

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,22 @@
22

33
<template>
44
<!-- Package header — matches area-header in [...name].vue -->
5-
<header class="bg-[--bg] pt-5 pb-1 w-full container">
6-
<div class="min-w-0">
7-
<!-- Package name -->
8-
<div class="min-w-0 flex items-center gap-2 justify-between">
9-
<h1 class="font-mono text-2xl sm:text-3xl font-medium">
10-
<SkeletonInline class="block! h-9 w-48" />
11-
</h1>
12-
<div class="flex gap-1">
13-
<!-- Compare placeholder -->
14-
<SkeletonBlock class="w-9 md:w-40 h-9 rounded self-baseline" />
15-
<!-- Likes button placeholder -->
16-
<SkeletonBlock class="w-14 h-9 rounded self-baseline" />
17-
</div>
5+
<header class="bg-bg pt-6 pb-2 pb-1 w-full container">
6+
<!-- Package name -->
7+
<div class="flex items-baseline justify-between gap-x-2 gap-y-1 flex-wrap min-w-0">
8+
<h1 class="font-mono text-2xl sm:text-3xl font-medium">
9+
<SkeletonInline class="block! h-9 w-48" />
10+
</h1>
11+
<div class="flex gap-2 flex-wrap items-stretch">
12+
<!-- Compare placeholder -->
13+
<SkeletonBlock class="w-9 md:w-36 h-9 rounded" />
14+
<!-- Likes button placeholder -->
15+
<SkeletonBlock class="w-14 h-9 rounded" />
1816
</div>
1917
</div>
2018
</header>
2119

22-
<div class="sticky top-14 z-1 pt-3 bg-bg border-b border-border w-full">
20+
<div class="w-full bg-bg sticky top-14 z-10 border-b border-border pt-2">
2321
<div class="w-full container flex flex-col md:flex-row-reverse flex-wrap gap-2 justify-between">
2422
<!-- Version -->
2523
<span class="inline-flex items-baseline font-mono text-base sm:text-lg shrink-0">

0 commit comments

Comments
 (0)