1+ import React , { useState , useEffect } from "react" ;
2+ import Layout from "@theme/Layout" ;
3+ import useDocusaurusContext from "@docusaurus/useDocusaurusContext" ;
4+ import {
5+ Github ,
6+ Users ,
7+ Star ,
8+ GitPullRequest ,
9+ Trophy ,
10+ ExternalLink ,
11+ Code2 ,
12+ Heart
13+ } from 'lucide-react' ;
14+
15+ interface Contributor {
16+ id : number ;
17+ login : string ;
18+ avatar_url : string ;
19+ html_url : string ;
20+ contributions : number ;
21+ }
22+
23+ export default function Contributors ( ) {
24+ const { siteConfig } = useDocusaurusContext ( ) ;
25+ const [ contributors , setContributors ] = useState < Contributor [ ] > ( [ ] ) ;
26+ const [ loading , setLoading ] = useState ( true ) ;
27+
28+ // --- Fetch Real GitHub Data ---
29+ useEffect ( ( ) => {
30+ fetch ( "https://api.github.com/repos/codeharborhub/codeharborhub.github.io/contributors?per_page=100" )
31+ . then ( ( res ) => res . json ( ) )
32+ . then ( ( data ) => {
33+ setContributors ( data ) ;
34+ setLoading ( false ) ;
35+ } )
36+ . catch ( ( err ) => console . error ( "Error fetching contributors:" , err ) ) ;
37+ } , [ ] ) ;
38+
39+ return (
40+ < Layout
41+ title = { `Contributors | ${ siteConfig . title } ` }
42+ description = "The amazing individuals building the future of CodeHarborHub."
43+ >
44+ < main className = "min-h-screen pb-20" style = { { backgroundColor : 'var(--ifm-bg-color)' , color : 'var(--ifm-text-color)' } } >
45+
46+ { /* --- Hero: The Recognition Wall --- */ }
47+ < section className = "relative py-24 px-6 overflow-hidden" >
48+ < div className = "absolute inset-0 opacity-10 pointer-events-none" >
49+ < div className = "absolute top-0 left-1/2 -translate-x-1/2 w-full h-full blur-[120px] rounded-full" style = { { backgroundColor : 'var(--ifm-color-primary)' } } />
50+ </ div >
51+
52+ < div className = "max-w-5xl mx-auto text-center relative z-10" >
53+ < div className = "inline-flex items-center gap-2 px-4 py-1.5 rounded-full text-[10px] font-black uppercase tracking-[0.3em] mb-8 border border-slate-200 dark:border-slate-800 backdrop-blur-md shadow-xl" >
54+ < Trophy size = { 14 } style = { { color : 'var(--ifm-color-primary)' } } /> Community Powered
55+ </ div >
56+ < h1 className = "text-5xl md:text-8xl font-black mb-8 leading-[0.9] tracking-tighter uppercase italic" >
57+ Our < span style = { { color : 'var(--ifm-color-primary)' } } > Engineers</ span >
58+ </ h1 >
59+ < p className = "text-xl opacity-60 max-w-2xl mx-auto font-medium leading-relaxed" >
60+ Every pull request, documentation fix, and bug report helps CodeHarborHub grow.
61+ We are a community-first organization. Meet the humans behind the code.
62+ </ p >
63+ </ div >
64+ </ section >
65+
66+ { /* --- Repository Stats --- */ }
67+ < section className = "pb-20 px-6" >
68+ < div className = "max-w-4xl mx-auto grid grid-cols-2 md:grid-cols-4 gap-4" >
69+ { [
70+ { label : "Contributors" , value : contributors . length || "..." , icon : < Users size = { 20 } /> } ,
71+ { label : "Open Issues" , value : "20+" , icon : < Code2 size = { 20 } /> } ,
72+ { label : "PRs Merged" , value : "150+" , icon : < GitPullRequest size = { 20 } /> } ,
73+ { label : "Community" , value : "Global" , icon : < Star size = { 20 } className = "text-yellow-500" /> } ,
74+ ] . map ( ( stat , i ) => (
75+ < div key = { i } className = "p-6 bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-3xl text-center shadow-sm" >
76+ < div className = "flex justify-center mb-3" style = { { color : 'var(--ifm-color-primary)' } } > { stat . icon } </ div >
77+ < div className = "text-2xl font-black" > { stat . value } </ div >
78+ < div className = "text-[10px] uppercase font-bold opacity-40 tracking-widest" > { stat . label } </ div >
79+ </ div >
80+ ) ) }
81+ </ div >
82+ </ section >
83+
84+ { /* --- The Contributor Wall --- */ }
85+ < section className = "py-12 px-6 max-w-7xl mx-auto" >
86+ { loading ? (
87+ < div className = "flex justify-center items-center h-40" >
88+ < div className = "animate-spin rounded-full h-12 w-12 border-b-2" style = { { borderColor : 'var(--ifm-color-primary)' } } />
89+ </ div >
90+ ) : (
91+ < div className = "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-6" >
92+ { contributors . map ( ( user ) => (
93+ < a
94+ key = { user . id }
95+ href = { user . html_url }
96+ target = "_blank"
97+ rel = "noopener noreferrer"
98+ className = "group relative block"
99+ >
100+ < div className = "relative overflow-hidden rounded-3xl aspect-square bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 transition-all duration-500 group-hover:-translate-y-2 group-hover:shadow-2xl group-hover:shadow-blue-500/10" >
101+ < img
102+ src = { user . avatar_url }
103+ alt = { user . login }
104+ className = "w-full h-full object-cover grayscale group-hover:grayscale-0 transition-all duration-700 scale-110 group-hover:scale-100"
105+ />
106+ < div className = "absolute inset-0 bg-gradient-to-t from-black/80 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500" />
107+
108+ { /* Badge for contributions */ }
109+ < div className = "absolute top-3 right-3 px-2 py-0.5 rounded-lg bg-black/60 backdrop-blur-md text-[8px] font-black text-white border border-white/10 opacity-0 group-hover:opacity-100 transition-opacity" >
110+ { user . contributions } Commits
111+ </ div >
112+
113+ < div className = "absolute bottom-4 left-4 right-4 text-center opacity-0 group-hover:opacity-100 transition-opacity duration-500" >
114+ < p className = "text-white text-xs font-black truncate uppercase tracking-tighter" > @{ user . login } </ p >
115+ </ div >
116+ </ div >
117+ </ a >
118+ ) ) }
119+ </ div >
120+ ) }
121+ </ section >
122+
123+ { /* --- How to Get Listed --- */ }
124+ < section className = "py-32 px-6" >
125+ < div className = "max-w-6xl mx-auto grid md:grid-cols-2 gap-12 items-center" >
126+ < div className = "text-left" >
127+ < h2 className = "text-4xl font-black mb-6 uppercase tracking-tighter leading-none" >
128+ Want your name < br />
129+ < span style = { { color : 'var(--ifm-color-primary)' } } > on this wall?</ span >
130+ </ h2 >
131+ < p className = "text-lg opacity-60 font-medium mb-10 leading-relaxed" >
132+ Whether you're fixing a typo, optimizing a React component, or designing
133+ the UI, we want you on our team. Follow our contribution guidelines
134+ and get started today.
135+ </ p >
136+ < div className = "flex flex-wrap gap-4" >
137+ < a
138+ href = "https://github.com/codeharborhub/codeharborhub.github.io/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22"
139+ target = "_blank"
140+ className = "px-8 py-4 rounded-2xl font-black uppercase text-xs tracking-widest text-white shadow-xl transition-all hover:scale-105"
141+ style = { { backgroundColor : 'var(--ifm-color-primary)' } }
142+ >
143+ Find First Issue
144+ </ a >
145+ < a
146+ href = "/contributing"
147+ className = "px-8 py-4 rounded-2xl font-black uppercase text-xs tracking-widest border border-slate-200 dark:border-slate-800 transition-all hover:bg-slate-100 dark:hover:bg-slate-800"
148+ >
149+ Read Guidelines
150+ </ a >
151+ </ div >
152+ </ div >
153+
154+ { /* Contribution Types Grid */ }
155+ < div className = "grid grid-cols-2 gap-4" >
156+ { [
157+ { label : "Code" , color : "bg-blue-500/10" , text : "text-blue-500" } ,
158+ { label : "Docs" , color : "bg-green-500/10" , text : "text-green-500" } ,
159+ { label : "Design" , color : "bg-purple-500/10" , text : "text-purple-500" } ,
160+ { label : "Support" , color : "bg-red-500/10" , text : "text-red-500" } ,
161+ ] . map ( ( item , i ) => (
162+ < div key = { i } className = { `p-8 rounded-[2.5rem] ${ item . color } flex flex-col items-center justify-center border border-white/5` } >
163+ < div className = { `font-black uppercase tracking-widest text-lg ${ item . text } ` } > { item . label } </ div >
164+ </ div >
165+ ) ) }
166+ </ div >
167+ </ div >
168+ </ section >
169+
170+ { /* --- Support Section --- */ }
171+ < section className = "py-20 px-6 text-center border-t border-slate-200 dark:border-slate-800" >
172+ < Heart className = "mx-auto mb-6 animate-pulse text-red-500" size = { 40 } />
173+ < h3 className = "text-2xl font-bold mb-4 italic uppercase tracking-widest" > Support our Open Source Journey</ h3 >
174+ < p className = "opacity-50 mb-8 font-medium" > Star the repo to show your support!</ p >
175+ < a
176+ href = "https://github.com/codeharborhub/codeharborhub.github.io"
177+ className = "inline-flex items-center gap-2 px-10 py-4 bg-slate-900 dark:bg-white text-white dark:text-slate-900 rounded-full font-black uppercase tracking-widest hover:scale-110 transition-all shadow-2xl"
178+ >
179+ < Github size = { 18 } /> Star on GitHub < Star size = { 16 } fill = "currentColor" />
180+ </ a >
181+ </ section >
182+
183+ </ main >
184+ </ Layout >
185+ ) ;
186+ }
0 commit comments