Skip to content

Commit ee645dd

Browse files
author
Alex Patterson
authored
Merge pull request CodingCatDev#142 from CodingCatDev/bug/titles
fixed titles to not be on the home page
2 parents 9a57476 + 0eace1a commit ee645dd

5 files changed

Lines changed: 31 additions & 7 deletions

File tree

frontend/main/src/components/PostsCards.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ export default function PostsCards({ posts }: { posts: Post[] }): JSX.Element {
88
<>
99
{posts && posts.length > 0 ? (
1010
<div className="p-4 sm:p-10">
11-
<h1 className="mb-4 text-5xl text-center lg:text-7xl">
12-
{posts[0].type.charAt(0).toUpperCase() + posts[0].type.slice(1)}s
13-
</h1>
1411
<section className="relative grid gap-4 grid-cols-fit sm:gap-10">
1512
{posts.map((post) => {
1613
return (
@@ -50,6 +47,13 @@ export default function PostsCards({ posts }: { posts: Post[] }): JSX.Element {
5047
<div className="absolute flex items-center flex-auto w-full h-full rounded-t-md bg-primary-900 dark:bg-primary-900">
5148
<AJPrimary className="w-full h-full p-4" />
5249
</div>
50+
{post.type === 'course' ? (
51+
<p className="absolute px-4 py-2 rounded-full bg-secondary-600 dark:bg-secondary-600 -bottom-12 -right-8 text-basics-50 dark:text-basics-50">
52+
Start now
53+
</p>
54+
) : (
55+
<></>
56+
)}
5357
</div>
5458
)}
5559
</a>

frontend/main/src/pages/blog.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ export default function Blog({
1919
title="Blog | CodingCatDev"
2020
canonical={`https://codingcat.dev/blog/`}
2121
></NextSeo>
22-
<PostsCards posts={posts} />
22+
<div className="p-4 sm:p-10">
23+
<h1 className="mb-4 text-5xl text-center lg:text-7xl">
24+
{posts[0].type.charAt(0).toUpperCase() + posts[0].type.slice(1)}s
25+
</h1>
26+
<PostsCards posts={posts} />
27+
</div>
2328
</Layout>
2429
);
2530
}

frontend/main/src/pages/courses.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ export default function Courses({
2020
canonical={`https://codingcat.dev/courses/`}
2121
></NextSeo>
2222

23-
<PostsCards posts={posts} />
23+
<div className="p-4 sm:p-10">
24+
<h1 className="mb-4 text-5xl text-center lg:text-7xl">
25+
{posts[0].type.charAt(0).toUpperCase() + posts[0].type.slice(1)}s
26+
</h1>
27+
<PostsCards posts={posts} />
28+
</div>
2429
</Layout>
2530
);
2631
}

frontend/main/src/pages/podcasts.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ export default function Blog({
2020
canonical={`https://codingcat.dev/podcasts/`}
2121
></NextSeo>
2222

23-
<PostsCards posts={posts} />
23+
<div className="p-4 sm:p-10">
24+
<h1 className="mb-4 text-5xl text-center lg:text-7xl">
25+
{posts[0].type.charAt(0).toUpperCase() + posts[0].type.slice(1)}s
26+
</h1>
27+
<PostsCards posts={posts} />
28+
</div>
2429
</Layout>
2530
);
2631
}

frontend/main/src/pages/tutorials.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ export default function Tutorials({
2020
canonical={`https://codingcat.dev/tutorials/`}
2121
></NextSeo>
2222

23-
<PostsCards posts={posts} />
23+
<div className="p-4 sm:p-10">
24+
<h1 className="mb-4 text-5xl text-center lg:text-7xl">
25+
{posts[0].type.charAt(0).toUpperCase() + posts[0].type.slice(1)}s
26+
</h1>
27+
<PostsCards posts={posts} />
28+
</div>
2429
</Layout>
2530
);
2631
}

0 commit comments

Comments
 (0)