@@ -89,8 +89,9 @@ export default function PostPage({ postsByTag, tagCounts }: Props) {
8989 < >
9090 < main >
9191 { /* 상단 영역만 배경색 적용 */ }
92- < div className = { `${ selectedTag !== 'latest' ? gradientStyle : 'bg-white' } ${ selectedTag !== 'latest' ? 'text-white' : 'text-black' } ` } >
93- < Header isDark = { selectedTag !== 'latest' } />
92+ < div
93+ className = { `${ selectedTag !== 'latest' ? gradientStyle : 'bg-white' } ${ selectedTag !== 'latest' ? 'text-white' : 'text-black' } ` } >
94+ < Header isDark = { selectedTag !== 'latest' } />
9495 { /* PostSection */ }
9596 < div className = "w-full mx-auto px-4 sm:px-6 lg:px-8 py-20 text-center" >
9697 < h1 className = { `text-5xl font-extrabold tracking-tight mb-4 ${ selectedTag === "latest" ? "text-gray-900" : "text-white" } ` } >
@@ -103,31 +104,34 @@ export default function PostPage({ postsByTag, tagCounts }: Props) {
103104 </ div >
104105
105106 { /* Tag 필터 탭 */ }
106- < div className = "tag-section py-4 px-4 sm:px-6 lg:px-8 bg-white" >
107- < nav className = "flex justify-center flex-wrap gap-4 mb-12" >
108- { tagList . map ( tag => (
109- < button
110- key = { tag }
111- onClick = { ( ) => {
112- setSelectedTag ( tag ) ;
113- setVisibleCount ( 10 ) ;
114- } }
115- className = { `capitalize px-5 py-2 rounded-full text-sm font-medium border transition-all ${
116- selectedTag === tag
117- ? "bg-black text-white"
118- : "bg-gray-100 text-black border-gray-300"
119- } `}
120- >
121- { tag . charAt ( 0 ) . toUpperCase ( ) + tag . slice ( 1 ) } ({ tagCounts [ tag ] } )
122- </ button >
123- ) ) }
107+ < div className = "py-6 px-4 sm:px-6 lg:px-8 bg-white dark:bg-black" >
108+ < nav className = "flex flex-wrap justify-center gap-2 sm:gap-3 max-w-6xl mx-auto" >
109+ { tagList . map ( tag => {
110+ const isActive = selectedTag === tag ;
111+ return (
112+ < button
113+ key = { tag }
114+ onClick = { ( ) => {
115+ setSelectedTag ( tag ) ;
116+ setVisibleCount ( 10 ) ;
117+ } }
118+ className = {
119+ `capitalize px-4 py-1.5 rounded-full text-sm font-medium transition-colors duration-150
120+ ${ isActive ? "bg-gray-800 text-white shadow-sm"
121+ : "bg-gray-100 text-gray-700 border border-gray-200 hover:bg-gray-200" }
122+ ` }
123+ >
124+ { tag . charAt ( 0 ) . toUpperCase ( ) + tag . slice ( 1 ) } ({ tagCounts [ tag ] } )
125+ </ button >
126+ ) ;
127+ } ) }
124128 </ nav >
125129 </ div >
126130
127131 { /* 카드 리스트 영역 */ }
128132 < div className = "card-section max-w-6xl mx-auto px-4 pb-16 bg-white" >
129133 < div className = "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 gap-8" >
130- { visiblePosts . map ( ( { id, title, summary, description, date, updated } ) => (
134+ { visiblePosts . map ( ( { id, title, summary, description, date, updated} ) => (
131135 < Link key = { id } href = { `/post/${ id } ` } legacyBehavior >
132136 < a className = "group flex flex-col justify-between p-6 min-h-[200px] rounded-2xl border border-gray-200 bg-white shadow-sm hover:shadow-md hover:-translate-y-1 hover:bg-gray-50 transition duration-200 ease-in-out" >
133137 < div className = "space-y-2" >
@@ -151,23 +155,23 @@ export default function PostPage({ postsByTag, tagCounts }: Props) {
151155 { /* 더 보기 버튼 */ }
152156 { hasMore && (
153157 < div className = "mt-10 text-center" >
154- < button
155- onClick = { ( ) => setVisibleCount ( prev => prev + 10 ) }
156- className = "px-6 py-2 text-sm font-medium rounded-full bg-black text-white hover:bg-gray-800 transition"
157- >
158- 더 보기
159- </ button >
160- </ div >
158+ < button
159+ onClick = { ( ) => setVisibleCount ( prev => prev + 10 ) }
160+ className = "px-6 py-2 text-sm font-medium rounded-full bg-black text-white hover:bg-gray-800 transition"
161+ >
162+ 더 보기
163+ </ button >
164+ </ div >
161165 ) }
162166 </ div >
163167 </ main >
164- < Link
165- href = "/"
166- className = "fixed bottom-6 right-6 z-50 bg-white border border-gray-300 rounded-lg shadow-md p-3 hover:shadow-lg transition"
167- aria-label = "홈으로 가기"
168- >
169- < Home className = "w-6 h-6 text-gray-800" />
170- </ Link >
171- </ >
168+ < Link
169+ href = "/"
170+ className = "fixed bottom-6 right-6 z-50 bg-white border border-gray-300 rounded-lg shadow-md p-3 hover:shadow-lg transition"
171+ aria-label = "홈으로 가기"
172+ >
173+ < Home className = "w-6 h-6 text-gray-800" />
174+ </ Link >
175+ </ >
172176 ) ;
173177}
0 commit comments