Skip to content

Commit a588ac1

Browse files
committed
Merge remote-tracking branch 'origin/main' into feature/docs-custom-badges-inputs
2 parents 850618a + 7c1cea8 commit a588ac1

File tree

3 files changed

+33
-29
lines changed

3 files changed

+33
-29
lines changed

app/components/Package/ExternalLinks.vue

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,6 @@ const homepageUrl = computed(() => {
2323
return homepage
2424
})
2525
26-
const fundingUrl = computed(() => {
27-
let funding = displayVersion.value?.funding
28-
if (Array.isArray(funding)) funding = funding[0]
29-
30-
if (!funding) return null
31-
32-
return typeof funding === 'string' ? funding : funding.url
33-
})
34-
3526
const PROVIDER_ICONS: Record<string, IconClass> = {
3627
github: 'i-simple-icons:github',
3728
gitlab: 'i-simple-icons:gitlab',
@@ -97,10 +88,5 @@ const repoProviderIcon = computed((): IconClass => {
9788
{{ $t('package.links.jsr') }}
9889
</LinkBase>
9990
</li>
100-
<li v-if="fundingUrl">
101-
<LinkBase :to="fundingUrl" classicon="i-lucide:heart">
102-
{{ $t('package.links.fund') }}
103-
</LinkBase>
104-
</li>
10591
</ul>
10692
</template>

app/components/Package/Header.vue

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,15 @@ const likeAction = async () => {
241241
isLikeActionPending.value = false
242242
}
243243
}
244+
245+
const fundingUrl = computed(() => {
246+
let funding = props.displayVersion?.funding
247+
if (Array.isArray(funding)) funding = funding[0]
248+
249+
if (!funding) return null
250+
251+
return typeof funding === 'string' ? funding : funding.url
252+
})
244253
</script>
245254

246255
<template>
@@ -312,6 +321,15 @@ const likeAction = async () => {
312321
</span>
313322
</ButtonBase>
314323
</TooltipApp>
324+
325+
<LinkBase
326+
variant="button-secondary"
327+
v-if="fundingUrl"
328+
:to="fundingUrl"
329+
classicon="i-lucide:handshake text-accent"
330+
>
331+
<span class="max-sm:sr-only">{{ $t('package.links.fund') }}</span>
332+
</LinkBase>
315333
</div>
316334
</div>
317335
</header>

app/components/Package/Skeleton.vue

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
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" />
16+
<!-- Fund link placeholder -->
17+
<SkeletonBlock class="w-22 h-9 rounded self-baseline" />
1818
</div>
1919
</div>
2020
</header>
2121

22-
<div class="sticky top-14 z-1 pt-3 bg-bg border-b border-border w-full">
22+
<div class="w-full bg-bg sticky top-14 z-10 border-b border-border pt-2">
2323
<div class="w-full container flex flex-col md:flex-row-reverse flex-wrap gap-2 justify-between">
2424
<!-- Version -->
2525
<span class="inline-flex items-baseline font-mono text-base sm:text-lg shrink-0">
@@ -176,7 +176,7 @@
176176
<!-- Sidebar — matches area-sidebar in [...name].vue -->
177177
<div class="area-sidebar">
178178
<div
179-
class="sticky top-30 xl:top-14 space-y-6 sm:space-y-8 min-w-0 overflow-y-auto pe-2.5 lg:(max-h-[calc(100dvh-8.5rem)] overscroll-contain) xl:(max-h-[calc(100dvh-6rem)])"
179+
class="space-y-6 sm:space-y-8 min-w-0 lg:(max-h-[calc(100dvh-8.5rem)] overscroll-contain) xl:(max-h-[calc(100dvh-6rem)])"
180180
>
181181
<div class="flex flex-col gap-4 sm:gap-6 xl:pt-4">
182182
<!-- Download stats — matches CollapsibleSection + sparkline skeleton -->

0 commit comments

Comments
 (0)