Skip to content

Commit bb12aba

Browse files
committed
add core contributors to home page
1 parent 4745305 commit bb12aba

6 files changed

Lines changed: 279 additions & 127 deletions

File tree

src/components/ContributorsWall.tsx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,30 @@ export function ContributorsWall({ library }: { library: Library }) {
1010
>
1111
<img
1212
alt="GitHub Contributors"
13-
src={`https://contrib.rocks/image?repo=tanstack/${library.id}`}
13+
src={`https://contrib.rocks/image?repo=${library.repo}`}
1414
loading="lazy"
1515
/>
1616
</a>
1717
<div className="text-xs text-gray-500 mt-2">
18-
Powered by <a href="https://contrib.rocks" target="_blank" rel="noopener noreferrer" className="underline">contrib.rocks</a>
18+
Powered by{' '}
19+
<a
20+
href="https://contrib.rocks"
21+
target="_blank"
22+
rel="noopener noreferrer"
23+
className="underline"
24+
>
25+
contrib.rocks
26+
</a>
27+
</div>
28+
<div className="mt-4">
29+
<a
30+
href={`https://github.com/${library.repo}/graphs/contributors`}
31+
target="_blank"
32+
rel="noopener noreferrer"
33+
className="text-sm text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 mb-2"
34+
>
35+
View all contributors on GitHub
36+
</a>
1937
</div>
2038
</div>
2139
)

src/components/MaintainerCard.tsx

Lines changed: 68 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import { Library, Framework, frameworkOptions } from '~/libraries'
2-
import { getRoleInLibrary, Maintainer } from '~/libraries/maintainers'
2+
import {
3+
getRoleInLibrary,
4+
Maintainer,
5+
getPersonsMaintainerOf,
6+
} from '~/libraries/maintainers'
7+
import { useState } from 'react'
38

4-
function RoleBadge({ role, libraryId }: { role: string; libraryId: string }) {
9+
function RoleBadge({ role }: { role: string }) {
510
const isCreator = role.toLowerCase().includes('creator')
611
const isMaintainer = role.toLowerCase().includes('maintainer')
712

@@ -37,12 +42,27 @@ function FrameworkChip({ framework }: { framework: Framework }) {
3742
)
3843
}
3944

45+
function LibraryBadge({ library }: { library: Library }) {
46+
return (
47+
<span
48+
className={`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium text-gray-700 dark:text-gray-300 ${
49+
library.bgStyle ?? 'bg-gray-500'
50+
} bg-opacity-20 dark:bg-opacity-20`}
51+
>
52+
{library.name}
53+
</span>
54+
)
55+
}
56+
4057
interface MaintainerCardProps {
4158
maintainer: Maintainer
42-
libraryId: Library['id']
59+
libraryId?: Library['id']
4360
}
4461

4562
export function MaintainerCard({ maintainer, libraryId }: MaintainerCardProps) {
63+
const libraries = getPersonsMaintainerOf(maintainer)
64+
const [showAllLibraries, setShowAllLibraries] = useState(false)
65+
4666
return (
4767
<a
4868
href={`https://github.com/${maintainer.github}`}
@@ -55,6 +75,8 @@ export function MaintainerCard({ maintainer, libraryId }: MaintainerCardProps) {
5575
alt={`${maintainer.name}'s avatar`}
5676
className="w-full h-full object-cover group-hover:scale-110 transition-transform duration-500"
5777
src={maintainer.avatar}
78+
loading="lazy"
79+
decoding="async"
5880
style={{
5981
aspectRatio: '1/1',
6082
objectFit: 'cover',
@@ -88,47 +110,78 @@ export function MaintainerCard({ maintainer, libraryId }: MaintainerCardProps) {
88110
</div>
89111
</div>
90112
<div className="p-3 space-y-2">
113+
{!libraryId && libraries.length > 0 && (
114+
<div className="flex flex-wrap gap-1.5">
115+
{libraries
116+
.slice(0, showAllLibraries ? undefined : 2)
117+
.map((library) => (
118+
<LibraryBadge key={library.id} library={library} />
119+
))}
120+
{!showAllLibraries && libraries.length > 2 && (
121+
<button
122+
onClick={(e) => {
123+
e.preventDefault()
124+
e.stopPropagation()
125+
setShowAllLibraries(true)
126+
}}
127+
className="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 transition-colors"
128+
>
129+
+{libraries.length - 3} more
130+
</button>
131+
)}
132+
</div>
133+
)}
91134
<div className="flex items-center justify-between">
92135
<h3 className="text-base font-bold">{maintainer.name}</h3>
93-
<RoleBadge
94-
role={getRoleInLibrary(maintainer, libraryId)}
95-
libraryId={libraryId}
96-
/>
136+
{libraryId && (
137+
<RoleBadge role={getRoleInLibrary(maintainer, libraryId)} />
138+
)}
97139
</div>
98-
<div className="flex items-center space-x-3 text-gray-500 dark:text-gray-400">
140+
<div className="flex items-center space-x-4 text-gray-400 dark:text-gray-500 [&>*]:grayscale">
99141
<a
100142
href={`https://github.com/${maintainer.github}`}
101-
className="hover:text-gray-700 dark:hover:text-gray-200 transition-colors"
143+
className="hover:text-gray-700 dark:hover:text-gray-200 transition-colors p-2 -m-2 hover:grayscale-0"
102144
target="_blank"
103145
rel="noopener noreferrer"
104146
onClick={(e) => e.stopPropagation()}
105147
>
106-
<svg viewBox="0 0 16 16" className="w-4 h-4" fill="currentColor">
148+
<svg viewBox="0 0 16 16" className="w-5 h-5" fill="currentColor">
107149
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path>
108150
</svg>
109151
</a>
110152
{maintainer.social?.twitter && (
111153
<a
112154
href={maintainer.social.twitter}
113-
className="hover:text-gray-700 dark:hover:text-gray-200 transition-colors"
155+
className="hover:text-gray-700 dark:hover:text-gray-200 transition-colors p-2 -m-2 hover:grayscale-0"
114156
target="_blank"
115157
rel="noopener noreferrer"
116158
onClick={(e) => e.stopPropagation()}
117159
>
118-
<svg viewBox="0 0 24 24" className="w-4 h-4" fill="currentColor">
119-
<path d="M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z" />
160+
<svg viewBox="0 0 24 24" className="w-5 h-5" fill="currentColor">
161+
<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" />
120162
</svg>
121163
</a>
122164
)}
165+
{maintainer.social?.bluesky && (
166+
<a
167+
href={maintainer.social.bluesky}
168+
className="hover:text-gray-700 dark:hover:text-gray-200 transition-colors p-2 -m-2 hover:grayscale-0"
169+
target="_blank"
170+
rel="noopener noreferrer"
171+
onClick={(e) => e.stopPropagation()}
172+
>
173+
<span className="text-lg">🦋</span>
174+
</a>
175+
)}
123176
{maintainer.social?.website && (
124177
<a
125178
href={maintainer.social.website}
126-
className="hover:text-gray-700 dark:hover:text-gray-200 transition-colors"
179+
className="hover:text-gray-700 dark:hover:text-gray-200 transition-colors p-2 -m-2 hover:grayscale-0"
127180
target="_blank"
128181
rel="noopener noreferrer"
129182
onClick={(e) => e.stopPropagation()}
130183
>
131-
<svg viewBox="0 0 24 24" className="w-4 h-4" fill="currentColor">
184+
<svg viewBox="0 0 24 24" className="w-5 h-5" fill="currentColor">
132185
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z" />
133186
</svg>
134187
</a>

src/libraries/index.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export type Library = {
6060
| 'create-tsrouter-app'
6161
name: string
6262
cardStyles: string
63-
to: string
63+
to?: string
6464
tagline: string
6565
description: string
6666
ogImage?: string
@@ -90,6 +90,7 @@ export type Library = {
9090
}[]
9191
docsRoot?: string
9292
embedEditor?: 'codesandbox' | 'stackblitz'
93+
visible?: boolean
9394
}
9495

9596
export type LibraryMenuItem = {
@@ -110,6 +111,16 @@ export const libraries = [
110111
rangerProject,
111112
dbProject,
112113
configProject,
114+
{
115+
id: 'react-charts',
116+
name: 'React Charts',
117+
repo: 'tanstack/react-charts',
118+
} as Library,
119+
{
120+
id: 'create-tsrouter-app',
121+
name: 'Create TS Router App',
122+
repo: 'tanstack/create-tsrouter-app',
123+
} as Library,
113124
] satisfies Library[]
114125

115126
export const librariesByGroup = {

src/libraries/maintainers.ts

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const allMaintainers: Maintainer[] = [
3434
'virtual',
3535
'ranger',
3636
'store',
37+
'pacer',
3738
'react-charts',
3839
],
3940
frameworkExpertise: ['react', 'solid'],
@@ -208,6 +209,63 @@ export const allMaintainers: Maintainer[] = [
208209
website: 'https://www.linkedin.com/in/jonghyeonko',
209210
},
210211
},
212+
{
213+
name: 'Riccardo Perra',
214+
avatar:
215+
'https://cdn.bsky.app/img/avatar/plain/did:plc:gtnigsmgu7jyrc4tnkvn62qw/bafkreiceysbj4o6jrbbniudtwj3tcsns6rvwcxyjsqiaumeojurwbkki5a@jpeg',
216+
github: 'riccardoperra',
217+
contributorOf: ['table'],
218+
frameworkExpertise: ['angular', 'solid'],
219+
specialties: [],
220+
social: {
221+
twitter: 'https://x.com/riccardoperra0',
222+
bluesky: 'https://bsky.app/profile/riccardoperra.bsky.social',
223+
website: 'https://riccardoperra.com',
224+
},
225+
},
226+
{
227+
name: 'Birk Skyum',
228+
avatar: 'https://github.com/birkskyum.png',
229+
github: 'birkskyum',
230+
maintainerOf: ['start'],
231+
frameworkExpertise: ['solid'],
232+
specialties: [],
233+
social: {
234+
twitter: 'https://x.com/birkskyum',
235+
bluesky: 'https://bsky.app/profile/bskyum.bsky.social',
236+
},
237+
},
238+
{
239+
name: 'Arnoud de Vries',
240+
avatar: 'https://github.com/arnoud-dv.png',
241+
github: 'arnoud-dv',
242+
maintainerOf: ['query'],
243+
frameworkExpertise: ['angular', 'react'],
244+
specialties: [
245+
'Architecture',
246+
'Developer Experience',
247+
'TypeScript',
248+
'Reactivity',
249+
],
250+
social: {
251+
twitter: 'https://x.com/Arnoud_dv',
252+
bluesky: 'https://bsky.app/profile/arnoud.dev',
253+
website: 'https://www.linkedin.com/in/arnouddv/',
254+
},
255+
},
256+
{
257+
name: 'Fülöp Kovács',
258+
isCoreMaintainer: false,
259+
avatar: 'https://github.com/fulopkovacs.png',
260+
github: 'fulopkovacs',
261+
maintainerOf: ['form'],
262+
frameworkExpertise: ['react'],
263+
social: {
264+
website: 'https://fulop.dev/',
265+
twitter: 'https://x.com/notacheetah',
266+
bluesky: 'https://bsky.app/profile/notacheetah.bsky.social',
267+
},
268+
},
211269
]
212270

213271
export const coreMaintainers = allMaintainers.filter(

src/routes/_libraries/index.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import splashLightImg from '~/images/splash-light.png'
1515
import splashDarkImg from '~/images/splash-dark.png'
1616
import { GadFooter } from '~/components/GoogleScripts'
1717
import LandingPageGad from '~/components/LandingPageGad'
18+
import { MaintainerCard } from '~/components/MaintainerCard'
19+
import { coreMaintainers } from '~/libraries/maintainers'
1820

1921
export const textColors = [
2022
`text-rose-500`,
@@ -382,6 +384,17 @@ function Index() {
382384
</div>
383385
</div>
384386

387+
<div className="px-4 lg:max-w-screen-lg md:mx-auto">
388+
<h3 className={`text-4xl font-light mb-6`}>Core Maintainers</h3>
389+
<div
390+
className={`grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3`}
391+
>
392+
{coreMaintainers.map((maintainer) => (
393+
<MaintainerCard key={maintainer.github} maintainer={maintainer} />
394+
))}
395+
</div>
396+
</div>
397+
385398
<LandingPageGad />
386399

387400
<div className="px-4 mx-auto max-w-screen-lg">

0 commit comments

Comments
 (0)