11import type { GithubUser } from "@hanghae-plus/domain" ;
2- import { BookOpen , Github } from "lucide-react" ;
2+ import { BookOpen , Github , Users } from "lucide-react" ;
33import { useUsers } from "@/features" ;
44import { Link } from "react-router" ;
55import { Badge , Card } from "@/components" ;
66
77const CompactStudentCard = ( { id, link, image } : GithubUser ) => {
88 return (
9- < Card className = "p-3 transition-all duration-100 hover:scale-[1.02] hover:shadow-lg group cursor-pointer" >
10- < Link to = { `/user/${ id } ` } className = "flex flex-col items-center text-center space-y-2" >
11- { /* 프로필 이미지 및 랭킹 */ }
12- < div className = "relative" >
13- < div className = "w-12 h-12 rounded-full overflow-hidden ring-1 ring-orange-500/30 group-hover:ring-orange-400/50 transition-all" >
14- < img src = { image } alt = { id } className = "w-full h-full object-cover" />
15- </ div >
16- </ div >
9+ < Card className = "hover:shadow-glow transition-all duration-300 cursor-pointer animate-fade-in hover:scale-[1.02] group bg-card border border-border" >
10+ < Link to = { `/user/${ id } ` } className = "block" >
11+ < div className = "p-3" >
12+ { /* 프로필 섹션 */ }
13+ < div className = "flex flex-col items-center text-center space-y-2" >
14+ < div className = "relative" >
15+ < div className = "w-12 h-12 rounded-full overflow-hidden ring-2 ring-orange-500/30 group-hover:ring-orange-400/50 transition-all" >
16+ < img src = { image } alt = { id } className = "w-full h-full object-cover" />
17+ </ div >
18+ < div className = "absolute -bottom-0.5 -right-0.5 w-3 h-3 bg-green-500 rounded-full border border-slate-800" > </ div >
19+ </ div >
1720
18- { /* 이름 */ }
19- < div className = "space-y-0.5 " >
20- < h3 className = "text-sm font-semibold text-white group-hover:text-orange-300 transition-colors truncate w-full" >
21- { id }
22- </ h3 >
23- </ div >
21+ < div className = "w-full" >
22+ < h3 className = "text-sm font-semibold text-white group-hover:text-orange-300 transition-colors break-words leading-tight " >
23+ { id }
24+ </ h3 >
25+ < p className = "text-xs text-slate-400 mt-1" > 프론트엔드 6기 </ p >
26+ </ div >
2427
25- { /* 액션 버튼 */ }
26- < div className = "flex gap-1" >
27- < Badge className = " text-slate-300 cursor-pointer" onClick = { ( ) => window . open ( link , "_blank" ) } >
28- < Github className = "w-3 h-3" />
29- </ Badge >
28+ < Badge
29+ variant = "secondary"
30+ className = "text-xs bg-slate-700 hover:bg-slate-600 cursor-pointer transition-colors px-2 py-1"
31+ onClick = { ( e : React . MouseEvent ) => {
32+ e . preventDefault ( ) ;
33+ window . open ( link , "_blank" ) ;
34+ } }
35+ >
36+ < Github className = "w-4 h-4" />
37+ </ Badge >
38+ </ div >
3039 </ div >
3140 </ Link >
3241 </ Card >
@@ -37,27 +46,46 @@ export const Home = () => {
3746 const users = useUsers ( ) ;
3847
3948 return (
40- < main className = "max-w-7xl mx-auto px-4 py-4 " >
49+ < main className = "max-w-7xl mx-auto px-4 py-6 " >
4150 { /* 상단 통계 */ }
42- < div className = "mb-4 space-y-4" >
51+ < div className = "mb-6 space-y-4" >
52+ < div className = "flex items-center justify-between" >
53+ < h2 className = "text-2xl font-bold text-white" > 수강생 명단</ h2 >
54+ < Badge variant = "secondary" className = "text-sm bg-slate-700" >
55+ 총 { users . items . length } 명
56+ </ Badge >
57+ </ div >
58+
4359 { /* 통계 카드 */ }
44- < div className = "grid grid-cols-2 md:grid-cols-4 gap-3" >
45- < Card className = "p-3" >
46- < div className = "flex items-center space-x-2" >
47- < div className = "w-8 h-8 bg-orange-500/20 rounded-lg flex items-center justify-center" >
48- < BookOpen className = "w-4 h-4 text-orange-400" />
60+ < div className = "grid grid-cols-1 md:grid-cols-2 gap-4" >
61+ < Card className = "p-4 bg-slate-800/50 border-slate-700" >
62+ < div className = "flex items-center space-x-3" >
63+ < div className = "w-10 h-10 bg-orange-500/20 rounded-lg flex items-center justify-center" >
64+ < Users className = "w-5 h-5 text-orange-400" />
65+ </ div >
66+ < div >
67+ < div className = "text-2xl font-bold text-white" > { users . items . length } </ div >
68+ < div className = "text-sm text-slate-400" > 총 수강생</ div >
69+ </ div >
70+ </ div >
71+ </ Card >
72+
73+ < Card className = "p-4 bg-slate-800/50 border-slate-700" >
74+ < div className = "flex items-center space-x-3" >
75+ < div className = "w-10 h-10 bg-green-500/20 rounded-lg flex items-center justify-center" >
76+ < BookOpen className = "w-5 h-5 text-green-400" />
4977 </ div >
5078 < div >
51- < div className = "text-lg font-bold text-white" > { users . items . length } </ div >
52- < div className = "text-xs text-slate-400" > 총 수강생 </ div >
79+ < div className = "text-2xl font-bold text-white" > 6기 </ div >
80+ < div className = "text-sm text-slate-400" > 현재 기수 </ div >
5381 </ div >
5482 </ div >
5583 </ Card >
5684 </ div >
5785 </ div >
5886
59- { /* 수강생 그리드 - 더 많은 컬럼으로 조정 */ }
60- < div className = "grid grid-cols-3 sm:grid-cols-3 md:grid-cols-5 lg:grid-cols-5 xl:grid-cols-6 gap-3 " >
87+ { /* 수강생 그리드 */ }
88+ < div className = "grid gap-4 grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 " >
6189 { users . items . map ( ( user ) => (
6290 < CompactStudentCard key = { user . id } { ...user } />
6391 ) ) }
0 commit comments