mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-29 03:10:42 +01:00
docs: add team page
This commit is contained in:
@@ -2,8 +2,8 @@
|
|||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
const links = [{
|
const links = [{
|
||||||
label: 'Figma',
|
label: 'Team',
|
||||||
to: '/figma'
|
to: '/team'
|
||||||
}, {
|
}, {
|
||||||
label: 'Roadmap',
|
label: 'Roadmap',
|
||||||
to: '/roadmap'
|
to: '/roadmap'
|
||||||
|
|||||||
@@ -176,7 +176,11 @@ community:
|
|||||||
links:
|
links:
|
||||||
- label: Star on GitHub
|
- label: Star on GitHub
|
||||||
color: neutral
|
color: neutral
|
||||||
variant: outline
|
|
||||||
to: https://github.com/nuxt/ui
|
to: https://github.com/nuxt/ui
|
||||||
target: _blank
|
target: _blank
|
||||||
icon: i-lucide-star
|
icon: i-lucide-star
|
||||||
|
- label: Meet the team
|
||||||
|
color: neutral
|
||||||
|
variant: outline
|
||||||
|
to: /team
|
||||||
|
trailingIcon: i-lucide-arrow-right
|
||||||
|
|||||||
@@ -23,18 +23,7 @@ const { data: components } = await useAsyncData('ui-components', () => {
|
|||||||
.all()
|
.all()
|
||||||
})
|
})
|
||||||
|
|
||||||
const { data: module } = await useFetch<{
|
const { data: module } = await useFetch('/api/module.json')
|
||||||
stats: {
|
|
||||||
downloads: number
|
|
||||||
stars: number
|
|
||||||
}
|
|
||||||
contributors: {
|
|
||||||
username: string
|
|
||||||
}[]
|
|
||||||
}>('https://api.nuxt.com/modules/ui', {
|
|
||||||
key: 'stats',
|
|
||||||
transform: ({ stats, contributors }) => ({ stats, contributors })
|
|
||||||
})
|
|
||||||
|
|
||||||
const { format } = Intl.NumberFormat('en', { notation: 'compact' })
|
const { format } = Intl.NumberFormat('en', { notation: 'compact' })
|
||||||
|
|
||||||
|
|||||||
151
docs/app/pages/team.vue
Normal file
151
docs/app/pages/team.vue
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
const title = 'Meet the Team'
|
||||||
|
const description = 'The development of Nuxt UI is led by a community of developers from all over the world.'
|
||||||
|
|
||||||
|
useSeoMeta({
|
||||||
|
titleTemplate: '%s - Nuxt UI',
|
||||||
|
title,
|
||||||
|
ogTitle: 'Nuxt UI Team',
|
||||||
|
description
|
||||||
|
})
|
||||||
|
|
||||||
|
defineOgImageComponent('Docs', {
|
||||||
|
headline: 'Community'
|
||||||
|
})
|
||||||
|
|
||||||
|
const { data: module } = await useFetch('/api/module.json')
|
||||||
|
|
||||||
|
const contributors = computed(() => module.value?.contributors?.filter(contributor => !module.value?.team?.find(user => user.login === contributor.username)))
|
||||||
|
|
||||||
|
const icons = {
|
||||||
|
website: 'i-lucide-link',
|
||||||
|
twitter: 'i-simple-icons-x',
|
||||||
|
twitch: 'i-simple-icons-twitch',
|
||||||
|
youtube: 'i-simple-icons-youtube',
|
||||||
|
instagram: 'i-simple-icons-instagram',
|
||||||
|
linkedin: 'i-simple-icons-linkedin',
|
||||||
|
mastodon: 'i-simple-icons-mastodon',
|
||||||
|
bluesky: 'i-simple-icons-bluesky',
|
||||||
|
github: 'i-simple-icons-github'
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<UMain>
|
||||||
|
<UPageHero
|
||||||
|
:title="title"
|
||||||
|
:description="description"
|
||||||
|
class="relative"
|
||||||
|
orientation="vertical"
|
||||||
|
:ui="{ title: 'text-balance', container: 'relative' }"
|
||||||
|
>
|
||||||
|
<template #top>
|
||||||
|
<div class="absolute z-[-1] rounded-full bg-(--ui-primary) blur-[300px] size-60 sm:size-80 transform -translate-x-1/2 left-1/2 -translate-y-80" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<LazyStarsBg />
|
||||||
|
</UPageHero>
|
||||||
|
|
||||||
|
<UPageSection :ui="{ container: '!pt-0' }">
|
||||||
|
<UPageGrid class="xl:grid-cols-4">
|
||||||
|
<UPageCard
|
||||||
|
v-for="(user, index) in module?.team"
|
||||||
|
:key="index"
|
||||||
|
:title="user.name"
|
||||||
|
:description="[user.pronouns, user.location].filter(Boolean).join(' ・ ')"
|
||||||
|
:ui="{
|
||||||
|
container: 'gap-y-4 lg:p-8',
|
||||||
|
leading: 'flex justify-center',
|
||||||
|
title: 'text-center',
|
||||||
|
description: 'text-center text-(--ui-text-muted)'
|
||||||
|
}"
|
||||||
|
variant="subtle"
|
||||||
|
>
|
||||||
|
<template #leading>
|
||||||
|
<UAvatar provider="ipx" :src="`https://ipx.nuxt.com/f_auto,s_80x80/gh_avatar/${user.login}`" :srcset="`https://ipx.nuxt.com/f_auto,s_160x160/gh_avatar/${user.login} 2x`" size="3xl" class="mx-auto" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<div class="flex items-center justify-center gap-1">
|
||||||
|
<UButton
|
||||||
|
v-for="(link, key) in user.socialAccounts"
|
||||||
|
:key="key"
|
||||||
|
color="neutral"
|
||||||
|
variant="link"
|
||||||
|
:to="link.url"
|
||||||
|
:icon="icons[key as keyof typeof icons] || icons.website"
|
||||||
|
:alt="`Link to ${user.name}'s ${key} profile`"
|
||||||
|
target="_blank"
|
||||||
|
size="sm"
|
||||||
|
/>
|
||||||
|
<UButton
|
||||||
|
:to="`https://github.com/${user.login}`"
|
||||||
|
color="neutral"
|
||||||
|
variant="link"
|
||||||
|
:alt="`Link to ${user.name}'s GitHub profile`"
|
||||||
|
:icon="icons.github"
|
||||||
|
target="_blank"
|
||||||
|
/>
|
||||||
|
<UButton
|
||||||
|
v-if="user.websiteUrl"
|
||||||
|
:to="user.websiteUrl"
|
||||||
|
color="neutral"
|
||||||
|
variant="link"
|
||||||
|
:alt="`Link to ${user.name}'s personal website`"
|
||||||
|
:icon="icons.website"
|
||||||
|
target="_blank"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div v-if="user.sponsorsListing" class="flex items-center justify-center">
|
||||||
|
<UButton
|
||||||
|
:to="user.sponsorsListing"
|
||||||
|
target="_blank"
|
||||||
|
color="neutral"
|
||||||
|
variant="subtle"
|
||||||
|
icon="i-lucide-heart"
|
||||||
|
label="Sponsor"
|
||||||
|
:ui="{ leadingIcon: 'text-pink-500 dark:text-pink-400' }"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</UPageCard>
|
||||||
|
</UPageGrid>
|
||||||
|
|
||||||
|
<ProseHr />
|
||||||
|
|
||||||
|
<UPageGrid class="xl:grid-cols-6">
|
||||||
|
<UPageCard
|
||||||
|
v-for="contributor in contributors"
|
||||||
|
:key="contributor.username"
|
||||||
|
:title="contributor.username"
|
||||||
|
:ui="{
|
||||||
|
container: 'gap-y-2',
|
||||||
|
leading: 'flex justify-center',
|
||||||
|
title: 'text-center',
|
||||||
|
description: 'text-center text-(--ui-text-muted)'
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<template #leading>
|
||||||
|
<UAvatar
|
||||||
|
provider="ipx"
|
||||||
|
:src="`https://ipx.nuxt.com/f_auto,s_80x80/gh_avatar/${contributor.username}`"
|
||||||
|
:srcset="`https://ipx.nuxt.com/f_auto,s_160x160/gh_avatar/${contributor.username} 2x`"
|
||||||
|
size="3xl"
|
||||||
|
class="mx-auto"
|
||||||
|
loading="lazy"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<div class="flex items-center justify-center gap-1">
|
||||||
|
<UButton
|
||||||
|
:to="`https://github.com/${contributor.username}`"
|
||||||
|
color="neutral"
|
||||||
|
variant="link"
|
||||||
|
:alt="`Link to ${contributor.username}'s GitHub profile`"
|
||||||
|
:icon="icons.github"
|
||||||
|
target="_blank"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</UPageCard>
|
||||||
|
</UPageGrid>
|
||||||
|
</UPageSection>
|
||||||
|
</UMain>
|
||||||
|
</template>
|
||||||
34
docs/server/api/module.json.get.ts
Normal file
34
docs/server/api/module.json.get.ts
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
interface TeamMember {
|
||||||
|
name: string
|
||||||
|
login: string
|
||||||
|
avatarUrl: string
|
||||||
|
pronouns?: string
|
||||||
|
location?: string
|
||||||
|
websiteUrl?: string
|
||||||
|
sponsorsListing?: string
|
||||||
|
socialAccounts: Record<string, { displayName: string, url: string }>
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Module {
|
||||||
|
stats: {
|
||||||
|
downloads: number
|
||||||
|
stars: number
|
||||||
|
}
|
||||||
|
contributors: {
|
||||||
|
username: string
|
||||||
|
}[]
|
||||||
|
}
|
||||||
|
export default defineCachedEventHandler(async () => {
|
||||||
|
const team = await $fetch<TeamMember[]>('https://api.nuxt.com/teams/ui')
|
||||||
|
const { stats, contributors } = await $fetch<Module>('https://api.nuxt.com/modules/ui')
|
||||||
|
|
||||||
|
return {
|
||||||
|
team,
|
||||||
|
stats,
|
||||||
|
contributors
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
maxAge: 60 * 60, // 1 hour
|
||||||
|
shouldBypassCache: () => !!import.meta.dev,
|
||||||
|
getKey: () => 'module'
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user