@@ -4,6 +4,7 @@ import { getAllPostMeta } from '@/lib/blog/registry'
44import { StudioHero } from '@/app/(landing)/studio/hero'
55import { FeaturedGrid , PostGrid } from '@/app/(landing)/studio/post-grid'
66import { getCategoryById , getPrimaryCategory } from '@/app/(landing)/studio/tag-colors'
7+ import { WithSidebar } from '@/app/(landing)/studio/with-sidebar'
78
89export const metadata : Metadata = {
910 title : 'Studio' ,
@@ -48,90 +49,92 @@ export default async function StudioIndex({
4849 }
4950
5051 return (
51- < div className = 'flex flex-col' >
52- < script
53- type = 'application/ld+json'
54- dangerouslySetInnerHTML = { { __html : JSON . stringify ( studioJsonLd ) } }
55- />
56- { pageNum === 1 && ! tag && < StudioHero /> }
57- < div className = 'mx-auto w-full max-w-5xl py-12' >
58- { activeCategory && (
59- < div className = 'mb-8 flex items-center gap-3' >
60- < span className = 'font-mono text-[10px] uppercase tracking-widest text-[#666]' >
61- Filtered by:
62- </ span >
63- < span
64- className = 'px-2 py-0.5 font-mono text-[10px] uppercase tracking-wider'
65- style = { {
66- border : `1px solid ${ activeCategory . color } ` ,
67- color : activeCategory . color ,
68- } }
69- >
70- { activeCategory . label }
71- </ span >
72- < Link
73- href = '/studio'
74- className = 'font-mono text-[10px] uppercase tracking-wider text-[#999] transition-colors hover:text-[#ECECEC]'
75- >
76- Clear
77- </ Link >
78- </ div >
79- ) }
80- { featured . length > 0 && (
81- < section className = 'mb-10' >
82- < h2 className = 'mb-8 flex items-center gap-2 font-mono text-[11px] uppercase tracking-widest text-[#666]' >
83- < span className = 'inline-block h-2 w-2 bg-[#FA4EDF]' aria-hidden = 'true' />
84- Featured Content
85- </ h2 >
86- < FeaturedGrid posts = { featured } />
87- </ section >
88- ) }
89- { feed . length > 0 && (
90- < section >
91- < h2 className = 'mb-8 flex items-center gap-2 font-mono text-[11px] uppercase tracking-widest text-[#666]' >
92- < span className = 'inline-block h-2 w-2 bg-[#00F701]' aria-hidden = 'true' />
93- { activeCategory ? activeCategory . label : 'All Posts' }
94- </ h2 >
95- < PostGrid posts = { feed } />
96- </ section >
97- ) }
98- { pagePosts . length === 0 && (
99- < div className = 'py-20 text-center' >
100- < p className = 'font-mono text-[14px] text-[#666]' > No posts found.</ p >
101- < Link
102- href = '/studio'
103- className = 'mt-4 inline-block font-mono text-[12px] uppercase tracking-wider text-[#999] transition-colors hover:text-[#ECECEC]'
104- >
105- View all posts
106- </ Link >
107- </ div >
108- ) }
109- { totalPages > 1 && (
110- < div className = 'mt-20 flex items-center justify-center gap-4 border-t border-[#2A2A2A] pt-12' >
111- { pageNum > 1 && (
52+ < WithSidebar >
53+ < div className = 'flex flex-col' >
54+ < script
55+ type = 'application/ld+json'
56+ dangerouslySetInnerHTML = { { __html : JSON . stringify ( studioJsonLd ) } }
57+ />
58+ { pageNum === 1 && ! tag && < StudioHero /> }
59+ < div className = 'mx-auto w-full max-w-5xl py-12' >
60+ { activeCategory && (
61+ < div className = 'mb-8 flex items-center gap-3' >
62+ < span className = 'font-mono text-[10px] uppercase tracking-widest text-[#666]' >
63+ Filtered by:
64+ </ span >
65+ < span
66+ className = 'px-2 py-0.5 font-mono text-[10px] uppercase tracking-wider'
67+ style = { {
68+ border : `1px solid ${ activeCategory . color } ` ,
69+ color : activeCategory . color ,
70+ } }
71+ >
72+ { activeCategory . label }
73+ </ span >
11274 < Link
113- href = { `/studio?page=${ pageNum - 1 } ${ tag ? `&tag=${ encodeURIComponent ( tag ) } ` : '' } ` }
114- className = 'border border-[#3d3d3d] bg-[#232323] px-6 py-2.5 font-mono text-[11px] uppercase tracking-wider text-[#999] transition-colors hover:border-[#666] hover:text-[#ECECEC]'
115- style = { { borderRadius : '5px' } }
75+ href = '/studio'
76+ className = 'font-mono text-[10px] uppercase tracking-wider text-[#999] transition-colors hover:text-[#ECECEC]'
11677 >
117- Previous
78+ Clear
11879 </ Link >
119- ) }
120- < span className = 'font-mono text-[10px] uppercase tracking-wider text-[#666]' >
121- Page { pageNum } of { totalPages }
122- </ span >
123- { pageNum < totalPages && (
80+ </ div >
81+ ) }
82+ { featured . length > 0 && (
83+ < section className = 'mb-10' >
84+ < h2 className = 'mb-8 flex items-center gap-2 font-mono text-[11px] uppercase tracking-widest text-[#666]' >
85+ < span className = 'inline-block h-2 w-2 bg-[#FA4EDF]' aria-hidden = 'true' />
86+ Featured Content
87+ </ h2 >
88+ < FeaturedGrid posts = { featured } />
89+ </ section >
90+ ) }
91+ { feed . length > 0 && (
92+ < section >
93+ < h2 className = 'mb-8 flex items-center gap-2 font-mono text-[11px] uppercase tracking-widest text-[#666]' >
94+ < span className = 'inline-block h-2 w-2 bg-[#00F701]' aria-hidden = 'true' />
95+ { activeCategory ? activeCategory . label : 'All Posts' }
96+ </ h2 >
97+ < PostGrid posts = { feed } />
98+ </ section >
99+ ) }
100+ { pagePosts . length === 0 && (
101+ < div className = 'py-20 text-center' >
102+ < p className = 'font-mono text-[14px] text-[#666]' > No posts found.</ p >
124103 < Link
125- href = { `/studio?page=${ pageNum + 1 } ${ tag ? `&tag=${ encodeURIComponent ( tag ) } ` : '' } ` }
126- className = 'border border-[#3d3d3d] bg-[#232323] px-6 py-2.5 font-mono text-[11px] uppercase tracking-wider text-[#999] transition-colors hover:border-[#666] hover:text-[#ECECEC]'
127- style = { { borderRadius : '5px' } }
104+ href = '/studio'
105+ className = 'mt-4 inline-block font-mono text-[12px] uppercase tracking-wider text-[#999] transition-colors hover:text-[#ECECEC]'
128106 >
129- Load more articles
107+ View all posts
130108 </ Link >
131- ) }
132- </ div >
133- ) }
109+ </ div >
110+ ) }
111+ { totalPages > 1 && (
112+ < div className = 'mt-20 flex items-center justify-center gap-4 border-t border-[#2A2A2A] pt-12' >
113+ { pageNum > 1 && (
114+ < Link
115+ href = { `/studio?page=${ pageNum - 1 } ${ tag ? `&tag=${ encodeURIComponent ( tag ) } ` : '' } ` }
116+ className = 'border border-[#3d3d3d] bg-[#232323] px-6 py-2.5 font-mono text-[11px] uppercase tracking-wider text-[#999] transition-colors hover:border-[#666] hover:text-[#ECECEC]'
117+ style = { { borderRadius : '5px' } }
118+ >
119+ Previous
120+ </ Link >
121+ ) }
122+ < span className = 'font-mono text-[10px] uppercase tracking-wider text-[#666]' >
123+ Page { pageNum } of { totalPages }
124+ </ span >
125+ { pageNum < totalPages && (
126+ < Link
127+ href = { `/studio?page=${ pageNum + 1 } ${ tag ? `&tag=${ encodeURIComponent ( tag ) } ` : '' } ` }
128+ className = 'border border-[#3d3d3d] bg-[#232323] px-6 py-2.5 font-mono text-[11px] uppercase tracking-wider text-[#999] transition-colors hover:border-[#666] hover:text-[#ECECEC]'
129+ style = { { borderRadius : '5px' } }
130+ >
131+ Load more articles
132+ </ Link >
133+ ) }
134+ </ div >
135+ ) }
136+ </ div >
134137 </ div >
135- </ div >
138+ </ WithSidebar >
136139 )
137140}
0 commit comments