-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
73 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<script setup lang="ts"> | ||
import { contributors } from '../../../scripts/contributors'; | ||
</script> | ||
|
||
<template> | ||
<div class="vp-doc"> | ||
<h2 class="op50 font-normal pt-5 pb-2"> | ||
Contributors | ||
</h2> | ||
</div> | ||
<div class="text-lg max-w-200 text-center leading-7 p-10"> | ||
<div class="flex flex-wrap gap-1 justify-center"> | ||
<a v-for="{ name, avatar } of contributors" :key="name" :href="`https://github.com/${name}`" class="m-0" rel="noopener noreferrer" :aria-label="`${name} on GitHub`"> | ||
<img loading="lazy" :src="avatar" width="40" height="40" class="rounded-full min-w-10 min-h-10 h-10 w-10" :alt="`${name}'s avatar`"> | ||
</a> | ||
</div> | ||
<br> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[ | ||
"hunghg255" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import contributors from './contributors.json' | ||
|
||
export interface Contributor { | ||
name: string | ||
avatar: string | ||
} | ||
|
||
export interface CoreTeam { | ||
avatar: string | ||
name: string | ||
github: string | ||
twitter?: string | ||
sponsors?: boolean | ||
description: string | ||
packages?: string[] | ||
functions?: string[] | ||
} | ||
|
||
const contributorsAvatars: Record<string, string> = {} | ||
|
||
function getAvatarUrl(name: string) { | ||
return `https://avatars.githubusercontent.com/${name}?v=4` | ||
} | ||
|
||
const contributorList = (contributors as string[]).reduce((acc, name) => { | ||
contributorsAvatars[name] = getAvatarUrl(name) | ||
acc.push({ name, avatar: contributorsAvatars[name] }) | ||
return acc | ||
}, [] as Contributor[]) | ||
|
||
export { contributorList as contributors } |