Skip to content

Commit 45ec2a1

Browse files
chore: remove sidebar
1 parent 3c4d87a commit 45ec2a1

File tree

6 files changed

+246
-170
lines changed

6 files changed

+246
-170
lines changed

apps/sim/app/(landing)/studio/authors/[id]/page.tsx

Lines changed: 46 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Image from 'next/image'
33
import Link from 'next/link'
44
import { getAllPostMeta } from '@/lib/blog/registry'
55
import { PostGrid } from '@/app/(landing)/studio/post-grid'
6+
import { WithSidebar } from '@/app/(landing)/studio/with-sidebar'
67

78
export const revalidate = 3600
89

@@ -49,52 +50,54 @@ export default async function AuthorPage({ params }: { params: Promise<{ id: str
4950
}
5051

5152
return (
52-
<div className='mx-auto max-w-5xl px-8 py-16 lg:px-12'>
53-
<script
54-
type='application/ld+json'
55-
dangerouslySetInnerHTML={{ __html: JSON.stringify(personJsonLd) }}
56-
/>
57-
<div className='mb-12 flex items-center gap-4'>
58-
{author.avatarUrl && (
59-
<div
60-
className='h-16 w-16 shrink-0 overflow-hidden border border-[#2A2A2A] bg-[#232323]'
61-
style={{ borderRadius: '5px' }}
62-
>
63-
<Image
64-
src={author.avatarUrl}
65-
alt={author.name}
66-
width={64}
67-
height={64}
68-
className='h-full w-full object-cover'
69-
unoptimized
70-
/>
71-
</div>
72-
)}
73-
<div>
74-
<div className='mb-1 font-mono text-[10px] uppercase tracking-widest text-[#FA4EDF]'>
75-
Author
76-
</div>
77-
<h1 className='font-[500] text-[32px] leading-tight tracking-[-0.02em] text-[#ECECEC]'>
78-
{author.name}
79-
</h1>
80-
{author.url && (
81-
<Link
82-
href={author.url}
83-
target='_blank'
84-
rel='noopener noreferrer'
85-
className='font-mono text-[11px] text-[#999] transition-colors hover:text-[#ECECEC]'
53+
<WithSidebar>
54+
<div className='mx-auto max-w-5xl px-8 py-16 lg:px-12'>
55+
<script
56+
type='application/ld+json'
57+
dangerouslySetInnerHTML={{ __html: JSON.stringify(personJsonLd) }}
58+
/>
59+
<div className='mb-12 flex items-center gap-4'>
60+
{author.avatarUrl && (
61+
<div
62+
className='h-16 w-16 shrink-0 overflow-hidden border border-[#2A2A2A] bg-[#232323]'
63+
style={{ borderRadius: '5px' }}
8664
>
87-
{author.xHandle ? `@${author.xHandle}` : 'Profile'}
88-
</Link>
65+
<Image
66+
src={author.avatarUrl}
67+
alt={author.name}
68+
width={64}
69+
height={64}
70+
className='h-full w-full object-cover'
71+
unoptimized
72+
/>
73+
</div>
8974
)}
75+
<div>
76+
<div className='mb-1 font-mono text-[10px] uppercase tracking-widest text-[#FA4EDF]'>
77+
Author
78+
</div>
79+
<h1 className='font-[500] text-[32px] leading-tight tracking-[-0.02em] text-[#ECECEC]'>
80+
{author.name}
81+
</h1>
82+
{author.url && (
83+
<Link
84+
href={author.url}
85+
target='_blank'
86+
rel='noopener noreferrer'
87+
className='font-mono text-[11px] text-[#999] transition-colors hover:text-[#ECECEC]'
88+
>
89+
{author.xHandle ? `@${author.xHandle}` : 'Profile'}
90+
</Link>
91+
)}
92+
</div>
9093
</div>
91-
</div>
92-
<h2 className='mb-8 flex items-center gap-2 font-mono text-[11px] uppercase tracking-widest text-[#666]'>
93-
<span className='inline-block h-2 w-2 bg-[#00F701]' aria-hidden='true' />
94-
Posts by {author.name}
95-
</h2>
94+
<h2 className='mb-8 flex items-center gap-2 font-mono text-[11px] uppercase tracking-widest text-[#666]'>
95+
<span className='inline-block h-2 w-2 bg-[#00F701]' aria-hidden='true' />
96+
Posts by {author.name}
97+
</h2>
9698

97-
<PostGrid posts={posts} />
98-
</div>
99+
<PostGrid posts={posts} />
100+
</div>
101+
</WithSidebar>
99102
)
100103
}

apps/sim/app/(landing)/studio/layout.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { Metadata } from 'next'
22
import Footer from '@/app/(home)/components/footer/footer'
33
import Navbar from '@/app/(home)/components/navbar/navbar'
4-
import { StudioSidebar } from '@/app/(landing)/studio/sidebar'
54

65
export const metadata: Metadata = {
76
title: {
@@ -45,10 +44,7 @@ export default function StudioLayout({ children }: { children: React.ReactNode }
4544
<header className='sticky top-0 z-50'>
4645
<Navbar />
4746
</header>
48-
<div className='flex flex-1 flex-col lg:flex-row'>
49-
<StudioSidebar />
50-
<main className='relative flex-1'>{children}</main>
51-
</div>
47+
<div className='flex-1'>{children}</div>
5248
<div className='border-t border-[#2A2A2A]'>
5349
<Footer />
5450
</div>

apps/sim/app/(landing)/studio/page.tsx

Lines changed: 81 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { getAllPostMeta } from '@/lib/blog/registry'
44
import { StudioHero } from '@/app/(landing)/studio/hero'
55
import { FeaturedGrid, PostGrid } from '@/app/(landing)/studio/post-grid'
66
import { getCategoryById, getPrimaryCategory } from '@/app/(landing)/studio/tag-colors'
7+
import { WithSidebar } from '@/app/(landing)/studio/with-sidebar'
78

89
export 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

Comments
 (0)