File tree 3 files changed +14
-5
lines changed
3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change
1
+ import type { ReactNode } from 'react' ;
1
2
import { Link } from 'waku' ;
2
3
3
4
type PostListItemProps = {
@@ -69,3 +70,9 @@ export const PostList = ({
69
70
) ) }
70
71
</ ul >
71
72
) ;
73
+
74
+ export const PostListContainer = ( { children } : { children : ReactNode } ) => (
75
+ < div className = "relative z-10 mx-auto w-full max-w-[80ch] pt-16 text-white lg:pt-36 xl:-right-[calc(296px/2)] 2xl:right-auto" >
76
+ { children }
77
+ </ div >
78
+ ) ;
Original file line number Diff line number Diff line change @@ -5,15 +5,17 @@ import { Page } from '../../components/page';
5
5
import { Meta } from '../../components/meta' ;
6
6
import { getAuthor } from '../../lib/get-author' ;
7
7
import type { BlogFrontmatter } from '../../types' ;
8
- import { PostList } from '../../components/post-list' ;
8
+ import { PostList , PostListContainer } from '../../components/post-list' ;
9
9
10
10
export default async function BlogIndexPage ( ) {
11
11
const articles = await getArticles ( ) ;
12
12
13
13
return (
14
14
< Page >
15
15
< Meta title = "Waku blog" description = "The official Waku developer blog." />
16
- < PostList posts = { articles } path = "blog" />
16
+ < PostListContainer >
17
+ < PostList posts = { articles } path = "blog" />
18
+ </ PostListContainer >
17
19
</ Page >
18
20
) ;
19
21
}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { compileMDX } from 'next-mdx-remote/rsc';
4
4
import { Page } from '../../components/page' ;
5
5
import { Meta } from '../../components/meta' ;
6
6
import type { BlogFrontmatter } from '../../types' ;
7
- import { PostList } from '../../components/post-list' ;
7
+ import { PostList , PostListContainer } from '../../components/post-list' ;
8
8
9
9
export default async function BlogIndexPage ( ) {
10
10
const articles = await getArticles ( ) ;
@@ -15,14 +15,14 @@ export default async function BlogIndexPage() {
15
15
title = "Waku guide"
16
16
description = "The guides for working with Waku."
17
17
/>
18
- < div className = "relative z-10 mx-auto w-full max-w-[80ch] pt-16 text-white lg:pt-36 xl:-right-[calc(296px/2)] 2xl:right-auto" >
18
+ < PostListContainer >
19
19
< p className = "bg-gray-950/90 mb-16 rounded-xl border border-gray-800 p-4 text-white sm:p-6 lg:p-12" >
20
20
Our guides walk through hosting instructions, framework behavior,
21
21
developer tooling, and more! We will talk through unstable APIs here,
22
22
so you can help experiment with our new and fun features.
23
23
</ p >
24
24
< PostList posts = { articles } path = "guides" />
25
- </ div >
25
+ </ PostListContainer >
26
26
</ Page >
27
27
) ;
28
28
}
You can’t perform that action at this time.
0 commit comments