Skip to content

Commit 95027d1

Browse files
authored
Merge pull request #4 from ameen4455/layout_fix
Add layout fix
2 parents 010f16f + 9fd71b0 commit 95027d1

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/components/common/Layout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const DefaultLayout = ({ data, children, bodyClass, isHome }) => {
8585
</div>
8686
</header>
8787

88-
<main className="px-4 py-4 mx-auto sm:max-w-xl md:max-w-full lg:max-w-screen-xl md:px-24 lg:px-8 lg:pt-16" id="site-main">
88+
<main id="site-main">
8989
{/* All the main content gets inserted here, index.js, post.js */}
9090
{children}
9191
</main>

src/templates/blogs.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ const Blogs = ({ data, location, pageContext }) => {
1919
<MetaData data={data} location={location} type="blogs" />
2020
<Layout>
2121
<div>
22-
<div className=" bg-bg-black py-8 text-white mx-auto">
23-
<h1 className="text-4xl md:text-5xl ml-4 font-semibold md:mx-auto max-w-3xl">
22+
<div className="bg-bg-black py-8 text-white mx-auto">
23+
<h1 className="text-4xl md:text-5xl ml-4 font-semibold md:mx-auto max-w-screen-md 2xl:max-w-screen-lg p-4">
2424
Blogposts
2525
</h1>
2626
</div>
@@ -33,8 +33,8 @@ const Blogs = ({ data, location, pageContext }) => {
3333
</div> */}
3434
</div>
3535

36-
<div className="post-container">
37-
<section className="post-feed max-w-3xl mx-auto">
36+
<div className="m-4 mt-16">
37+
<section className="post-feed max-w-3xl p-4 2xl:max-w-screen-lg mx-auto">
3838
{posts.map(({ node }) => (
3939
// The tag below includes the markup for each post - components/common/PostCard.js
4040
<PostCardBlog key={node.id} post={node} />

src/templates/post.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ const Post = ({ data, location }) => {
3232
<Layout>
3333
<div className="">
3434
<div className="bg-bg-black text-white">
35-
<div className="px-4 py-4 mx-auto sm:max-w-xl md:max-w-full lg:max-w-screen-xl md:px-24 lg:px-8 lg:pt-16">
36-
<div className="md:mx-auto text-left lg:max-w-4xl">
35+
<div className="px-4 py-4 mx-auto md:max-w-full lg:max-w-screen-md 2xl:max-w-screen-lg lg:pt-16">
36+
<div className="md:mx-auto text-left">
3737
<div>
3838
{post.tags.map((tag) => (
3939
<span className="uppercase text-sm text-iff-orange font-bold mr-4">
@@ -102,7 +102,7 @@ const Post = ({ data, location }) => {
102102
</div>
103103

104104
<article
105-
className="mt-16 prose md:prose-lg lg:prose-lg prose-img:rounded-xl prose-img:shadow-xl mx-auto p-4"
105+
className="mt-16 prose prose-img:rounded-xl prose-img:shadow-xl mx-auto lg:max-w-screen-md 2xl:max-w-screen-lg p-4"
106106
dangerouslySetInnerHTML={{ __html: post.html }}
107107
></article>
108108
</div>

0 commit comments

Comments
 (0)