-
-
Notifications
You must be signed in to change notification settings - Fork 336
feat: contributors pages for repos #423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
712922a
feat: contributors pages for repos
KevinVandy 88cbbee
prettier
KevinVandy f385cae
Update src/components/MaintainerCard.tsx
KevinVandy 83422d6
Update src/components/ContributorsWall.tsx
KevinVandy c087901
Update src/routes/_libraries/route.tsx
KevinVandy 332dc4e
Update src/libraries/maintainers.ts
KevinVandy 5b76456
Update src/libraries/maintainers.ts
KevinVandy e482c58
Update src/libraries/maintainers.ts
KevinVandy dbc29ad
Update src/libraries/maintainers.ts
KevinVandy 959ba7a
update contributors
KevinVandy 89f3783
update card design
KevinVandy 4745305
update social links
KevinVandy bb12aba
add core contributors to home page
KevinVandy 7406ce5
add details for Manuel
SeanCassiere 4377f6c
add details for Sean
SeanCassiere 9b74a3e
add details for TypeChris
SeanCassiere a8a9d17
fix the bluesky links for Dominik
SeanCassiere 4c2f1c7
Improve maintainer card pill designs
KevinVandy 3daca92
add more maintainers and fix card pill alignments
KevinVandy 12b7250
fix tanstack pill links when they don't exist
KevinVandy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
| import { type Library } from '~/libraries' | ||
|
|
||
| export function ContributorsWall({ library }: { library: Library }) { | ||
| return ( | ||
| <div className="flex flex-col items-center my-4"> | ||
| <a | ||
| href={`https://github.com/tanstack/${library.id}/graphs/contributors`} | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| > | ||
| <img | ||
| alt="GitHub Contributors" | ||
| src={`https://contrib.rocks/image?repo=tanstack/${library.id}`} | ||
|
KevinVandy marked this conversation as resolved.
Outdated
|
||
| loading="lazy" | ||
| /> | ||
| </a> | ||
| </div> | ||
| ) | ||
| } | ||
This file contains hidden or 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 hidden or 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,87 @@ | ||
| import { Library } from '~/libraries' | ||
| import { getRoleInLibrary, Maintainer } from '~/libraries/maintainers' | ||
|
|
||
| function RoleBadge({ role, libraryId }: { role: string; libraryId: string }) { | ||
| const isCreator = role.toLowerCase().includes('creator') | ||
| const isMaintainer = role.toLowerCase().includes('maintainer') | ||
|
|
||
| if (isCreator) { | ||
| return ( | ||
| <span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gradient-to-r from-purple-500 to-pink-500 text-white shadow-lg"> | ||
| {role} | ||
| </span> | ||
| ) | ||
| } | ||
|
|
||
| if (isMaintainer) { | ||
| return ( | ||
| <span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-500 text-white"> | ||
| {role} | ||
| </span> | ||
| ) | ||
| } | ||
|
|
||
| return <span className="text-gray-500 dark:text-gray-400">{role}</span> | ||
| } | ||
|
|
||
| interface MaintainerCardProps { | ||
| maintainer: Maintainer | ||
| libraryId: Library['id'] | ||
| } | ||
|
|
||
| export function MaintainerCard({ maintainer, libraryId }: MaintainerCardProps) { | ||
| return ( | ||
| <a | ||
| href={`https://github.com/${maintainer.github}`} | ||
| className="group bg-white dark:bg-gray-800 rounded-lg overflow-hidden shadow-lg" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| > | ||
| <div className="relative h-64 overflow-hidden"> | ||
| <img | ||
| alt={`${maintainer.name}'s avatar`} | ||
| className="w-full h-full object-cover group-hover:scale-110 transition-transform duration-500" | ||
| src={maintainer.avatar} | ||
| style={{ | ||
| aspectRatio: '1/1', | ||
| objectFit: 'cover', | ||
| }} | ||
| /> | ||
| <div className="absolute inset-0 bg-gradient-to-t from-black/10 to-transparent" /> | ||
| </div> | ||
| <div className="p-4 space-y-2"> | ||
| <div> | ||
| <h3 className="text-lg font-bold">{maintainer.name}</h3> | ||
| <p className="mt-1"> | ||
| <RoleBadge | ||
| role={getRoleInLibrary(maintainer, libraryId)} | ||
| libraryId={libraryId} | ||
| /> | ||
| </p> | ||
| <p className="text-gray-500 dark:text-gray-400 mt-2"> | ||
| <span className="inline-block w-5 text-center"> | ||
| <svg | ||
| viewBox="0 0 16 16" | ||
| className="w-4 h-4 inline-block" | ||
| fill="currentColor" | ||
| > | ||
| <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> | ||
| </svg> | ||
| </span> | ||
| @{maintainer.github} | ||
| </p> | ||
|
KevinVandy marked this conversation as resolved.
Outdated
|
||
| </div> | ||
| <ul className="flex flex-wrap"> | ||
| {maintainer.specialties?.map((specialty: string) => ( | ||
| <li | ||
| className="bg-gray-500/10 text-xs text-gray-500 dark:text-white rounded-full px-2 py-1 mr-2 mb-2" | ||
| key={specialty} | ||
| > | ||
| {specialty} | ||
| </li> | ||
| ))} | ||
| </ul> | ||
| </div> | ||
| </a> | ||
| ) | ||
| } | ||
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.