-
-
Notifications
You must be signed in to change notification settings - Fork 425
Expand file tree
/
Copy pathabout.vue
More file actions
343 lines (322 loc) · 13 KB
/
about.vue
File metadata and controls
343 lines (322 loc) · 13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
<script setup lang="ts">
import type { Role, SocialAccount } from '#server/api/contributors.get'
import { SPONSORS } from '~/assets/logos/sponsors'
import { OSS_PARTNERS } from '~/assets/logos/oss-partners'
useSeoMeta({
title: () => `${$t('about.title')} - npmx`,
ogTitle: () => `${$t('about.title')} - npmx`,
twitterTitle: () => `${$t('about.title')} - npmx`,
description: () => $t('about.meta_description'),
ogDescription: () => $t('about.meta_description'),
twitterDescription: () => $t('about.meta_description'),
})
defineOgImageComponent('Default', {
primaryColor: '#60a5fa',
title: 'about npmx',
description: 'a fast, modern browser for the **npm registry**',
})
const pmLinks = {
npm: 'https://www.npmjs.com/',
pnpm: 'https://pnpm.io/',
yarn: 'https://yarnpkg.com/',
bun: 'https://bun.sh/',
deno: 'https://deno.com/',
vlt: 'https://www.vlt.sh/',
}
const { data: contributors, status: contributorsStatus } = useLazyFetch('/api/contributors')
const governanceMembers = computed(
() => contributors.value?.filter(c => c.role !== 'contributor') ?? [],
)
const communityContributors = computed(
() => contributors.value?.filter(c => c.role === 'contributor') ?? [],
)
const socialIcons: Record<string, string> = {
TWITTER: 'i-simple-icons:x',
MASTODON: 'i-simple-icons:mastodon',
BLUESKY: 'i-simple-icons:bluesky',
LINKEDIN: 'i-simple-icons:linkedin',
YOUTUBE: 'i-simple-icons:youtube',
HOMETOWN: 'i-lucide:globe',
DISCORD: 'i-simple-icons:discord',
}
function getSocialIcon(provider: string): string {
return socialIcons[provider] ?? 'i-lucide:link'
}
function getSocialLinks(person: {
socialAccounts: SocialAccount[]
}): { provider: string; url: string; icon: string }[] {
return person.socialAccounts.map(account => ({
provider: account.provider,
url: account.url,
icon: getSocialIcon(account.provider),
}))
}
const roleLabels = computed(
() =>
({
steward: $t('about.team.role_steward'),
maintainer: $t('about.team.role_maintainer'),
}) as Partial<Record<Role, string>>,
)
</script>
<template>
<main class="container flex-1 py-12 sm:py-16 overflow-x-hidden">
<article class="max-w-2xl mx-auto">
<header class="mb-12">
<div class="flex items-baseline justify-between gap-4 mb-4">
<h1 class="font-mono text-3xl sm:text-4xl font-medium">
{{ $t('about.heading') }}
</h1>
<BackButton />
</div>
<p class="text-fg-muted text-lg">
{{ $t('tagline') }}
</p>
</header>
<section class="max-w-none space-y-12">
<div>
<h2 class="text-lg text-fg uppercase tracking-wider mb-4">
{{ $t('about.what_we_are.title') }}
</h2>
<p class="text-fg-muted leading-relaxed mb-4">
<i18n-t keypath="about.what_we_are.description" tag="span" scope="global">
<template #betterUxDx>
<strong class="text-fg">{{ $t('about.what_we_are.better_ux_dx') }}</strong>
</template>
<template #jsr>
<LinkBase to="https://jsr.io/" no-new-tab-icon>JSR</LinkBase>
</template>
</i18n-t>
</p>
<p class="text-fg-muted leading-relaxed">
<i18n-t keypath="about.what_we_are.admin_description" tag="span" scope="global">
<template #adminUi>
<strong class="text-fg">{{ $t('about.what_we_are.admin_ui') }}</strong>
</template>
</i18n-t>
</p>
</div>
<div>
<h2 class="text-lg text-fg uppercase tracking-wider mb-4">
{{ $t('about.what_we_are_not.title') }}
</h2>
<ul class="space-y-3 text-fg-muted list-none p-0">
<li class="flex items-start gap-3">
<span class="text-fg-subtle shrink-0 mt-1">—</span>
<span>
<strong class="text-fg">{{
$t('about.what_we_are_not.not_package_manager')
}}</strong>
{{ ' ' }}
<i18n-t
keypath="about.what_we_are_not.package_managers_exist"
tag="span"
scope="global"
>
<template #already>{{ $t('about.what_we_are_not.words.already') }}</template>
<template #people>
<LinkBase :to="pmLinks.npm" class="font-sans" no-new-tab-icon>{{
$t('about.what_we_are_not.words.people')
}}</LinkBase>
</template>
<template #building>
<LinkBase :to="pmLinks.pnpm" class="font-sans" no-new-tab-icon>{{
$t('about.what_we_are_not.words.building')
}}</LinkBase>
</template>
<template #really>
<LinkBase :to="pmLinks.yarn" class="font-sans" no-new-tab-icon>{{
$t('about.what_we_are_not.words.really')
}}</LinkBase>
</template>
<template #cool>
<LinkBase :to="pmLinks.bun" class="font-sans" no-new-tab-icon>{{
$t('about.what_we_are_not.words.cool')
}}</LinkBase>
</template>
<template #package>
<LinkBase :to="pmLinks.deno" class="font-sans" no-new-tab-icon>{{
$t('about.what_we_are_not.words.package')
}}</LinkBase>
</template>
<template #managers>
<LinkBase :to="pmLinks.vlt" class="font-sans" no-new-tab-icon>{{
$t('about.what_we_are_not.words.managers')
}}</LinkBase>
</template>
</i18n-t>
</span>
</li>
<li class="flex items-start gap-3">
<span class="text-fg-subtle shrink-0 mt-1">—</span>
<span>
<strong class="text-fg">{{ $t('about.what_we_are_not.not_registry') }}</strong>
{{ $t('about.what_we_are_not.registry_description') }}
</span>
</li>
</ul>
</div>
<!-- Sponsors -->
<div class="sponsors-logos">
<h2 class="text-lg text-fg uppercase tracking-wider mb-4">
{{ $t('about.sponsors.title') }}
</h2>
<AboutLogoList
:list="SPONSORS"
class="grid grid-cols-2 md:flex md:flex-row md:items-center"
/>
</div>
<!-- OSS partners -->
<div>
<h2 class="text-lg text-fg uppercase tracking-wider mb-4">
{{ $t('about.oss_partners.title') }}
</h2>
<AboutLogoList :list="OSS_PARTNERS" class="items-center" />
</div>
<div>
<h2 class="text-lg uppercase tracking-wider mb-4">
{{ $t('about.team.title') }}
</h2>
<p class="text-fg-muted leading-relaxed mb-6">
{{ $t('about.contributors.description') }}
</p>
<!-- Governance: stewards + maintainers -->
<section
v-if="governanceMembers.length"
class="mb-12"
aria-labelledby="governance-heading"
>
<h3 id="governance-heading" class="text-sm text-fg uppercase tracking-wider mb-4">
{{ $t('about.team.governance') }}
</h3>
<ul class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-3 list-none p-0">
<li
v-for="person in governanceMembers"
:key="person.id"
class="relative flex items-center gap-3 p-3 border border-border rounded-lg hover:border-border-hover hover:bg-bg-muted transition-[border-color,background-color] duration-200 cursor-pointer focus-within:ring-2 focus-within:ring-offset-bg focus-within:ring-offset-2 focus-within:ring-fg/50"
>
<img
:src="`${person.avatar_url}&s=80`"
:alt="`${person.login}'s avatar`"
class="w-12 h-12 rounded-md ring-1 ring-border shrink-0"
loading="lazy"
/>
<div class="min-w-0 flex-1">
<div class="font-mono text-sm text-fg truncate">
<NuxtLink
:to="person.html_url"
target="_blank"
class="decoration-none after:content-[''] after:absolute after:inset-0"
:aria-label="$t('about.contributors.view_profile', { name: person.login })"
>
@{{ person.login }}
</NuxtLink>
</div>
<div class="text-xs text-fg-muted tracking-tight">
{{ roleLabels[person.role] ?? person.role }}
</div>
<div
v-if="person.bio"
class="text-xs text-fg-subtle truncate mt-0.5"
:title="person.bio"
>
{{ person.bio }}
</div>
<div class="flex items-center gap-1.5 mt-1">
<LinkBase
v-if="person.sponsors_url"
:to="person.sponsors_url"
no-underline
no-external-icon
classicon="i-lucide:heart"
class="relative z-10 text-xs text-fg-muted hover:text-pink-400"
:aria-label="$t('about.team.sponsor_aria', { name: person.login })"
>
{{ $t('about.team.sponsor') }}
</LinkBase>
<div
v-if="getSocialLinks(person).length"
class="relative z-10 flex items-center gap-1"
>
<a
v-for="link in getSocialLinks(person)"
:key="link.provider"
:href="link.url"
target="_blank"
rel="noopener noreferrer"
class="text-fg-muted hover:text-fg transition-colors"
:aria-label="`${person.login} on ${link.provider.toLowerCase()}`"
>
<span :class="[link.icon, 'w-3 h-3']" aria-hidden="true" />
</a>
</div>
</div>
</div>
<span
class="i-lucide:external-link rtl-flip w-3.5 h-3.5 text-fg-muted opacity-50 shrink-0 self-start mt-0.5 pointer-events-none"
aria-hidden="true"
/>
</li>
</ul>
</section>
<!-- Contributors cloud -->
<section aria-labelledby="contributors-heading">
<h3 id="contributors-heading" class="text-sm uppercase tracking-wider mb-4">
{{
$t(
'about.contributors.title',
{ count: $n(communityContributors.length) },
communityContributors.length,
)
}}
</h3>
<div
v-if="contributorsStatus === 'pending'"
class="text-fg-subtle text-sm"
role="status"
>
{{ $t('about.contributors.loading') }}
</div>
<div
v-else-if="contributorsStatus === 'error'"
class="text-fg-subtle text-sm"
role="alert"
>
{{ $t('about.contributors.error') }}
</div>
<ul
v-else-if="communityContributors.length"
class="grid grid-cols-[repeat(auto-fill,48px)] justify-center gap-2 list-none p-0"
>
<li
v-for="contributor in communityContributors"
:key="contributor.id"
class="block group relative"
>
<TooltipApp :text="`@${contributor.login}`" class="block" position="top">
<a
:href="contributor.html_url"
target="_blank"
rel="noopener noreferrer"
:aria-label="$t('about.contributors.view_profile', { name: contributor.login })"
class="block rounded-lg"
>
<img
:src="`${contributor.avatar_url}&s=64`"
:alt="`${contributor.login}'s avatar`"
width="48"
height="48"
class="w-12 h-12 rounded-lg ring-2 ring-transparent group-hover:ring-accent transition-all duration-200 ease-out group-hover:scale-125 will-change-transform"
loading="lazy"
/>
</a>
</TooltipApp>
</li>
</ul>
</section>
</div>
<CallToAction />
</section>
</article>
</main>
</template>