Skip to content

Commit dda840e

Browse files
committed
dnd posts!
1 parent 2b6b3af commit dda840e

File tree

7 files changed

+46
-2
lines changed

7 files changed

+46
-2
lines changed

public/posts/my-first-dnd-post.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# My First D&D Post
2+
3+
This is a placeholder for my first D&D related blog post.
4+
5+
## Introduction
6+
7+
Welcome to the world of Dungeons & Dragons!
8+
9+
## Adventures
10+
11+
Here are some of my recent adventures:
12+
13+
* Lost in the Dungeon of the Mad Mage
14+
* Exploring the wilds of Chult
15+
* Saving the world from a lich

public/posts/shownPosts.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
[
2+
{
3+
"slug": "my-first-dnd-post",
4+
"title": "My First D&D Post",
5+
"date": "2025-10-21",
6+
"description": "An introduction to my D&D adventures.",
7+
"tags": ["dnd", "rpg", "adventure"],
8+
"category": "d&d"
9+
},
210
{
311
"slug": "gemini-explains-how-hooks-work-with-toast-component",
412
"title": "Gemini Explains How Hooks Work with Toast Component",

src/components/PostItem.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,25 @@ const PostItem = ({ slug, title, date, updatedDate, category, series, seriesInde
2424
? 'var(--color-dev-badge)'
2525
: category === 'series'
2626
? 'var(--color-series-badge)'
27+
: category === 'd&d'
28+
? 'var(--color-dnd-badge)'
2729
: 'var(--color-takes-badge)',
2830
};
2931
const postBackgroundColorClass =
3032
category === 'dev'
3133
? 'bg-dev-card-bg'
3234
: category === 'series'
3335
? 'bg-series-card-bg'
36+
: category === 'd&d'
37+
? 'bg-dnd-card-bg'
3438
: 'bg-takes-card-bg';
3539
const postHoverBackgroundColorClass =
3640
category === 'dev'
3741
? 'hover:bg-dev-card-bg-hover'
3842
: category === 'series'
3943
? 'hover:bg-series-card-bg-hover'
44+
: category === 'd&d'
45+
? 'hover:bg-dnd-card-bg-hover'
4046
: 'hover:bg-takes-card-bg-hover';
4147

4248
return (

src/components/PostMetadata.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,16 @@ const PostMetadata = ({
2424
backgroundColor:
2525
metadata.category === 'dev'
2626
? 'var(--color-dev-badge)'
27+
: metadata.category === 'd&d'
28+
? 'var(--color-dnd-badge)'
2729
: 'var(--color-takes-badge)',
2830
};
2931
const postMetadataBackgroundColorStyle = {
3032
backgroundColor:
3133
metadata.category === 'dev'
3234
? 'var(--color-dev-card-bg)'
35+
: metadata.category === 'd&d'
36+
? 'var(--color-dnd-card-bg)'
3337
: 'var(--color-takes-card-bg)',
3438
};
3539

src/config/colors.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ module.exports = {
2222
'takes-card-bg-hover': 'rgba(16, 185, 129, 0.275)', // emerald-500/20
2323
'series-card-bg': 'rgba(225, 29, 72, 0.1)', // rose-600/10
2424
'series-card-bg-hover': 'rgba(225, 29, 72, 0.2)', // rose-600/20
25-
26-
// Category RGBA variations for ColorLegends and LogCard
25+
'dnd-card-bg': 'rgba(139, 92, 246, 0.1)', // violet-500/10
26+
'dnd-card-bg-hover': 'rgba(139, 92, 246, 0.2)', // violet-500/20
27+
'color-dev-badge': '#10b981', // emerald-500
28+
'color-takes-badge': '#f97316', // orange-500
29+
'color-series-badge': '#ec4899', // pink-500
30+
'color-dnd-badge': '#a78bfa', // violet-400
2731
'book-alpha-10': 'rgba(59, 130, 246, 0.1)',
2832
'book-alpha-50': 'rgba(59, 130, 246, 0.5)',
2933
'movie-alpha-10': 'rgba(239, 68, 68, 0.1)',

src/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,5 @@ code {
5757
--color-dev-badge: #44403c; /* stone-700 */
5858
--color-takes-badge: #065f46; /* emerald-800 */
5959
--color-series-badge: #e11d48; /* rose-600 */
60+
--color-dnd-badge: #583fa3; /* violet-400 */
6061
}

src/pages/BlogPage.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,12 @@ const BlogPage = () => {
146146
>
147147
Series
148148
</button>
149+
<button
150+
onClick={() => setActiveFilter('d&d')}
151+
className={`px-4 py-2 rounded-full text-sm font-medium ${activeFilter === 'd&d' ? 'bg-primary-500 text-white' : 'bg-gray-700 text-gray-300 hover:bg-gray-600'}`}
152+
>
153+
D&D
154+
</button>
149155
</div>
150156
</div>
151157
<div className="mt-16">

0 commit comments

Comments
 (0)