Skip to content

Commit 6484028

Browse files
committed
Series 2
1 parent 12393a1 commit 6484028

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

public/posts/shownPosts.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,15 @@
8080
"title": "Introduction",
8181
"date": "2024-01-01",
8282
"series": "Gemini's Guide to React",
83-
"seriesIndex": 1
83+
"seriesIndex": 1,
84+
"category": "dev"
8485
},
8586
{
8687
"slug": "gemini-react-components",
8788
"title": "Understanding Components",
8889
"date": "2024-01-05",
8990
"series": "Gemini's Guide to React",
90-
"seriesIndex": 2
91+
"seriesIndex": 2,
92+
"category": "dev"
9193
}
9294
]

src/components/PostItem.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const PostItem = ({ slug, title, date, updatedDate, category, series, seriesInde
4646
>
4747
<article>
4848
<div className="flex items-center">
49-
<p className="text-sm text-gray-400">{formattedDate}</p>
49+
<p className="text-sm text-gray-400 w-28 flex-shrink-0">{formattedDate}</p>
5050
<div className="ml-4 flex-grow flex items-center">
5151
{category && (
5252
<span
@@ -56,7 +56,7 @@ const PostItem = ({ slug, title, date, updatedDate, category, series, seriesInde
5656
{category}
5757
</span>
5858
)}
59-
{series && !isSeries && (
59+
{series && isSeries === undefined && (
6060
<span className="mr-2 px-2 py-1 text-xs font-medium text-blue-400 bg-blue-400/10 rounded-full">
6161
{series} - Part {seriesIndex}
6262
</span>

src/config/colors.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ module.exports = {
2020
'dev-card-bg-hover': 'rgba(68, 64, 59, 0.55)', // stone-700/20
2121
'takes-card-bg': 'rgba(6, 95, 70, 0.175)', // emerald-900/15
2222
'takes-card-bg-hover': 'rgba(16, 185, 129, 0.275)', // emerald-500/20
23+
'series-card-bg': 'rgba(225, 29, 72, 0.1)', // rose-600/10
24+
'series-card-bg-hover': 'rgba(225, 29, 72, 0.2)', // rose-600/20
2325

2426
// Category RGBA variations for ColorLegends and LogCard
2527
'book-alpha-10': 'rgba(59, 130, 246, 0.1)',

src/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,5 @@ code {
5656
:root {
5757
--color-dev-badge: #44403c; /* stone-700 */
5858
--color-takes-badge: #065f46; /* emerald-800 */
59+
--color-series-badge: #e11d48; /* rose-600 */
5960
}

src/pages/SeriesPage.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ const SeriesPage = () => {
114114
category={post.category}
115115
series={post.series}
116116
seriesIndex={post.seriesIndex}
117+
isSeries={false}
117118
/>
118119
))}
119120
</div>

0 commit comments

Comments
 (0)