Skip to content

Commit 058c0ba

Browse files
committed
Fix bloglist
1 parent b1cde11 commit 058c0ba

File tree

4 files changed

+20
-19
lines changed

4 files changed

+20
-19
lines changed

src/components/common/PostCardBlog.js

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const PostCardBlog = ({ post, number }) => {
99

1010
return (
1111
<>
12-
<Link to={url} id="post-card" className="mb-4 w-full flex flex-col md:flex-row items-center pb-5 border-b-2 md:border-0">
13-
<div className=" md:w-1/3 md:mr-4">
12+
<Link to={url} id="post-card" className="mb-4 w-full flex hover:text-iff-orange flex-col md:flex-row items-center pb-5">
13+
<div className=" md:w-1/3 md:mr-10">
1414
<img
1515
src={post.feature_image || post.og_image || "/images/blog_placeholder_image.png"}
1616
className={
@@ -25,35 +25,36 @@ const PostCardBlog = ({ post, number }) => {
2525
<div className="line-clamp-1 overflow-clip">
2626
<Link
2727
to={`/tag/${post.primary_tag.slug}`}
28-
className={`bg-slate-100 capitalize hover:underline text-slate-500 mr-2 py-1 px-2 rounded-lg text-sm`}
28+
className={`bg-number-grey capitalize text-bg-black hover:text-iff-orange mr-2 py-1 px-3 rounded-full text-sm`}
2929
>
3030
{post.primary_tag.name}
3131
</Link>
3232
</div>
3333
}
3434
{post.featured && <span>Featured</span>}
35-
<h2 className="text-lg mt-2 md:text-xl mb-1 text-heading-black font-bold hover:underline">
35+
<h2 className="text-lg mt-2 md:text-xl mb-1 text-heading-black font-bold hover:text-iff-orange">
3636
{post.title}
3737
</h2>
3838
</header>
3939
<section className=" text-body-grey line-clamp-6 my-2 md:line-clamp-2">
4040
{post.excerpt}
4141
</section>
42-
<div>
43-
{post.authors.map((author, index) =>
44-
<Link to={`/author/${author.slug}`} key={index} className=" text-sm font-semibold text-neutral-600 hover:underline">
45-
{author.name} {index !== post.authors.length - 1 && "& "}
46-
</Link>
47-
)}
48-
</div>
49-
<footer className="flex text-sm pb-4 font-light">
50-
<div className="mr-3 text-iff-orange">
42+
<div className="flex text-sm pb-2">
43+
<div className="mr-3 text-gray-900">
5144
<span>{post.published_at_pretty}</span>
5245
</div>
53-
<div className="ml-3 text-iff-orange font-light">
46+
<div className="ml-3 text-gray-900">
5447
<div>{readingTime}</div>
5548
</div>
56-
</footer>
49+
</div>
50+
<hr />
51+
<div className="mt-1 pb-2">
52+
{post.authors.map((author, index) =>
53+
<Link to={`/author/${author.slug}`} key={index} className=" text-sm text-gray-900 hover:text-iff-orange">
54+
{author.name}{index !== post.authors.length - 1 && (index === post.authors.length - 2 ? " & " : ", ")}
55+
</Link>
56+
)}
57+
</div>
5758
</div>
5859
</Link>
5960
</>

src/templates/author.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const Author = ({ data, location, pageContext }) => {
3333
</div>
3434
</div>
3535
<div className="post-container">
36-
<section className="post-feed max-w-3xl mx-auto">
36+
<section className="post-feed max-w-4xl mx-auto">
3737
{posts.map(({ node }) => (
3838
// The tag below includes the markup for each post - components/common/PostCard.js
3939
<PostCardBlog key={node.id} post={node} />

src/templates/blogs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const Blogs = ({ data, location, pageContext }) => {
2020
<Layout>
2121
<div>
2222
<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">
23+
<h1 className="text-4xl md:text-5xl ml-4 font-semibold md:mx-auto max-w-4xl 2xl:max-w-screen-lg p-4">
2424
Blogposts
2525
</h1>
2626
</div>
@@ -34,7 +34,7 @@ const Blogs = ({ data, location, pageContext }) => {
3434
</div>
3535

3636
<div className="m-4 mt-16">
37-
<section className="post-feed max-w-3xl p-4 2xl:max-w-screen-lg mx-auto">
37+
<section className="post-feed max-w-4xl 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/tag.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const Tag = ({ data, location, pageContext }) => {
3636
</div>
3737

3838
<div className="post-container">
39-
<section className="post-feed max-w-3xl mx-auto">
39+
<section className="post-feed max-w-4xl mx-auto">
4040
{posts.map(({ node }) => (
4141
// The tag below includes the markup for each post - components/common/PostCard.js
4242
<PostCardBlog key={node.id} post={node} />

0 commit comments

Comments
 (0)