Skip to content

Commit

Permalink
Update data source
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemans committed Jul 18, 2024
1 parent 067475a commit aa2feda
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 199 deletions.
92 changes: 41 additions & 51 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
import { general_contributors, team2, teamSparkles } from '../list';
'use client';

type Person = string;

export default async function App() {
const { contributors } = await fetch(
'https://raw.githubusercontent.com/v3xlabs/v3x-data/master/team/contributors.json'
).then(
async (response) =>
(await response.json()) as { contributors: Person[] }
);
const { core } = await fetch(
'https://raw.githubusercontent.com/v3xlabs/v3x-data/master/team/core.json'
).then(
async (response) =>
(await response.json()) as {
core: {
name: string;
title: string;
avatar: string;
url?: string;
}[];
}
);

export default function App() {
return (
<div className="mx-auto flex w-screen max-w-3xl items-center justify-center p-4 md:p-8">
<div className="flex w-full flex-col gap-4">
Expand All @@ -13,8 +35,13 @@ export default function App() {
<div className="mt-4">
<div>Team ✨</div>
<div className="mt-4 grid grid-cols-1 gap-4 lg:grid-cols-2">
{teamSparkles.map((member, index) => (
<span key={index} className="group flex w-full">
{core.map((member, index) => (
<a
href={member.url}
target="_blank"
key={index}
className="group flex w-full"
>
<div className="w-24">
<div className="relative aspect-square h-24 w-24 overflow-hidden bg-neutral-300">
{member.avatar && (
Expand All @@ -39,65 +66,28 @@ export default function App() {
{member.title ?? 'Contributor'}
</div>
</div>
</span>
))}
</div>
</div>
<div className="mt-4">
<div>Team 🌱</div>
<div className="mt-4 grid grid-cols-1 gap-4 lg:grid-cols-2">
{team2.map((member, index) => (
<div key={index} className="group flex w-full">
<div className="relative aspect-square h-14 w-14 overflow-hidden bg-neutral-300">
{member.avatar && (
<img
src={member.avatar}
alt=""
className="h-full w-full object-cover grayscale transition-all group-hover:grayscale-0"
/>
)}
{!member.avatar && (
<div className="absolute bottom-0 left-1/2 -translate-x-1/2 text-4xl grayscale transition-all group-hover:grayscale-0">
🤷‍♀️
</div>
)}
</div>
<div className="w-auto grow px-3 py-2 group-hover:bg-neutral-200/10 group-hover:font-bold">
<div className="">
{member.name ?? 'Unknown Contributor'}
</div>
<div className="text-neutral-400">
{member.title ?? 'Contributor'}
</div>
</div>
</div>
</a>
))}
</div>
</div>
<div className="mt-4">
<div>Contributors 🤝</div>
<div className="mt-4 flex flex-wrap gap-2">
{general_contributors.map((member, index) => (
{contributors.map((member, index) => (
<a
href={member.url}
href={`https://github.com/${member}`}
rel="nofollow"
target="_blank"
className="group relative aspect-square h-12 w-12 overflow-hidden bg-neutral-300"
key={index}
title={member}
>
{member.avatar && (
<img
src={member.avatar}
alt={member.name}
loading="lazy"
className="h-full w-full object-cover grayscale group-hover:grayscale-0"
/>
)}
{!member.avatar && (
<div className="absolute bottom-0 left-1/2 -translate-x-1/2 text-3xl grayscale group-hover:grayscale-0">
🤷‍♀️
</div>
)}
<img
src={`https://github.com/${member}.png`}
alt={member}
loading="lazy"
className="h-full w-full object-cover grayscale group-hover:grayscale-0"
/>
</a>
))}
</div>
Expand Down
148 changes: 0 additions & 148 deletions list.ts

This file was deleted.

0 comments on commit aa2feda

Please sign in to comment.