Skip to content

Commit

Permalink
docs: core team social links (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Sep 30, 2022
1 parent 2be76b2 commit ce948b5
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 28 deletions.
58 changes: 58 additions & 0 deletions docs/.vitepress/contributors.ts
@@ -0,0 +1,58 @@
export interface SocialEntry {
icon: string
link: string
}

export interface CoreTeam {
avatar: string
name: string
// required to download avatars from GitHub
github: string
twitter: string
sponsor?: string
title?: string
org?: string
desc?: string
links?: SocialEntry[]
}

const createLinks = (tm: CoreTeam): CoreTeam => {
tm.links = [
{ icon: 'github', link: `https://github.com/${tm.github}` },
{ icon: 'twitter', link: `https://twitter.com/${tm.twitter}` },
]
return tm
}

const plainTeamMembers = [
{
avatar: '/team-avatars/antfu.png',
name: 'Anthony Fu',
github: 'antfu',
twitter: 'antfu7',
sponsor: 'https://github.com/sponsors/antfu',
title: 'A fanatical open sourceror, working',
org: 'NuxtLabs',
desc: 'Core team member of Vite & Vue',
},
{
avatar: '/team-avatars/userquin.png',
name: 'Joaquín Sánchez',
github: 'userquin',
twitter: 'userquin',
title: 'A fullstack and android developer',
desc: 'Vite\'s fanatical follower',
},
{
avatar: '/team-avatars/hannoeru.png',
name: 'ハン / Han',
github: 'hannoeru',
twitter: 'hannoeru',
title: 'Student / Front-End Engineer',
desc: '@windi_css member',
},
]

const teamMembers = plainTeamMembers.map(tm => createLinks(tm))

export { teamMembers }
29 changes: 1 addition & 28 deletions docs/.vitepress/theme/components/HomePage.vue
@@ -1,33 +1,6 @@
<script setup lang="ts">
import { VPTeamMembers } from 'vitepress/theme'
const teamMembers = [
{
avatar: '/team-avatars/antfu.png',
name: 'Anthony Fu',
github: 'antfu',
twitter: 'antfu7',
sponsor: 'https://github.com/sponsors/antfu',
title: 'A fanatical open sourceror, working',
org: 'NuxtLabs',
desc: 'Core team member of Vite & Vue',
},
{
avatar: '/team-avatars/userquin.png',
name: 'Joaquín Sánchez',
github: 'userquin',
twitter: 'userquin',
title: 'A fullstack and android developer',
desc: 'Vite\'s fanatical follower',
},
{
avatar: '/team-avatars/hannoeru.png',
name: 'ハン / Han',
github: 'hannoeru',
twitter: 'hannoeru',
title: 'Student / Front-End Engineer',
desc: '@windi_css member',
},
]
import { teamMembers } from '../../contributors'
</script>

<template>
Expand Down

0 comments on commit ce948b5

Please sign in to comment.