Skip to content

Commit 58b33d9

Browse files
committed
feat: container style adjustments
1 parent 4b102aa commit 58b33d9

4 files changed

Lines changed: 12 additions & 10 deletions

File tree

app/lib/main-section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from "react";
22

33
export function MainSection(props: { children: React.ReactNode }) {
44
return (
5-
<main className="min-h-screen px-4 py-0 flex-1 flex flex-column justify-center">
5+
<main className="min-h-screen px-4 py-0 flex-1 flex flex-column max-w-screen-md mx-auto">
66
{props.children}
77
</main>
88
);

app/pages/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ const Home: NextPage = () => {
5050
</Head>
5151

5252
<MainSection>
53-
<section className="text-gray-600 body-font overflow-hidden">
54-
<div className="container px-5 py-24 mx-auto">
53+
<section className="text-gray-600 body-font overflow-hidden w-full">
54+
<div className="container px-3 py-24 mx-auto">
5555
<div className="-my-8">
5656
{indexQuery?.data?.feed?.edges.map((edge) => (
5757
<FeedItem post={edge.node!} key={edge.cursor} />

app/pages/item/[postId].tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,18 @@ const Item: NextPage = () => {
112112
<title>supanews | {post.node?.title}</title>
113113
<meta name="description" content={post.node?.url} />
114114
</Head>
115-
<section className="text-gray-600 body-font overflow-hidden">
115+
<section className="text-gray-600 body-font overflow-hidden w-full">
116116
<div className="container px-5 py-24 mx-auto">
117117
<FeedItem post={post.node} key={post.cursor} />
118118

119-
<PostCommentForm postId={post.node.id} />
119+
<div className="max-w-md">
120+
<PostCommentForm postId={post.node.id} />
120121

121-
<div className="mt-10">
122-
{post.node?.comments?.edges.map((edge) => (
123-
<CommentItem comment={edge.node!} key={edge.cursor} />
124-
))}
122+
<div className="mt-10">
123+
{post.node?.comments?.edges.map((edge) => (
124+
<CommentItem comment={edge.node!} key={edge.cursor} />
125+
))}
126+
</div>
125127
</div>
126128
</div>
127129
</section>

app/pages/newest.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const Newest: NextPage = () => {
4343
</Head>
4444

4545
<MainSection>
46-
<section className="text-gray-600 body-font overflow-hidden">
46+
<section className="text-gray-600 body-font overflow-hidden w-full">
4747
<div className="container px-5 py-24 mx-auto">
4848
<div className="-my-8">
4949
{newestQuery?.data?.feed?.edges.map((edge) => (

0 commit comments

Comments
 (0)