Skip to content

Commit 127ed6c

Browse files
committed
feat: new category for blogposts.
1 parent 4629c6c commit 127ed6c

File tree

7 files changed

+78
-44
lines changed

7 files changed

+78
-44
lines changed

public/posts/posts.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"lazy-loading",
1313
"craco"
1414
],
15-
"category": "dev",
15+
"category": "feat",
1616
"filename": "reducing-react-app-size.txt",
1717
"authors": ["fezcode"],
1818
"image": "/images/defaults/visuals-2TS23o0-pUc-unsplash.jpg"

public/timeline/timeline.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
[
2+
{
3+
"date": "2025-11-27",
4+
"title": "Visual Modes",
5+
"description": "Implemented different visual modes that can be set in settings page or via Command Palette.",
6+
"type": "feature",
7+
"icon": "RocketLaunchIcon",
8+
"link": "/#/settings"
9+
},
210
{
311
"date": "2025-11-27",
412
"title": "Bundle Size Optimization",
@@ -133,4 +141,4 @@
133141
"icon": "CodeIcon",
134142
"link": "/"
135143
}
136-
]
144+
]

src/components/PostItem.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ const PostItem = ({
4646
? 'var(--color-dnd-badge)'
4747
: category === 'gist'
4848
? 'var(--color-gist-badge)'
49-
: 'var(--color-takes-badge)',
49+
: category === 'feat'
50+
? 'var(--color-feat-badge)'
51+
: 'var(--color-takes-badge)',
5052
};
5153

5254
const postBackgroundColorClass =
@@ -58,7 +60,9 @@ const PostItem = ({
5860
? 'bg-dnd-card-bg'
5961
: category === 'gist'
6062
? 'bg-gist-card-bg'
61-
: 'bg-takes-card-bg';
63+
: category === 'feat'
64+
? 'bg-feat-card-bg'
65+
: 'bg-takes-card-bg';
6266

6367
const postHoverBackgroundColorClass =
6468
category === 'dev'
@@ -69,7 +73,9 @@ const PostItem = ({
6973
? 'hover:bg-dnd-card-bg-hover'
7074
: category === 'gist'
7175
? 'hover:bg-gist-card-bg-hover'
72-
: 'hover:bg-takes-card-bg-hover';
76+
: category === 'feat'
77+
? 'hover:bg-feat-card-bg-hover'
78+
: 'hover:bg-takes-card-bg-hover';
7379

7480
const postTitleHoverColorClass =
7581
category === 'dev'
@@ -80,7 +86,9 @@ const PostItem = ({
8086
? 'group-hover:text-[var(--title-hover-dnd)]'
8187
: category === 'gist'
8288
? 'group-hover:text-[var(--title-hover-gist)]'
83-
: 'group-hover:text-[var(--title-hover-takes)]';
89+
: category === 'feat'
90+
? 'group-hover:text-[var(--title-hover-feat)]'
91+
: 'group-hover:text-[var(--title-hover-takes)]';
8492

8593
const categoryBadgeFontColorStyle =
8694
category === 'gist' || category === 'gist' ? 'text-black' : 'text-white'

src/components/metadata-cards/PostMetadata.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ const PostMetadata = ({
3131
? 'var(--color-dnd-badge)'
3232
: metadata.category === 'gist'
3333
? 'var(--color-gist-badge)'
34-
: 'var(--color-takes-badge)',
34+
: metadata.category === 'feat'
35+
? 'var(--color-feat-badge)'
36+
: 'var(--color-takes-badge)',
3537
};
3638

3739
const categoryBadgeFontColorStyle =

src/config/colors.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module.exports = {
1818
food: '#F4A259',
1919
websites: '#00FF7F',
2020
tools: '#e0aaff',
21+
feat: '#a855f7',
2122
'book-light': '#4dcdff',
2223
'movie-light': '#e84f6d',
2324
'game-light': '#00e6bf',
@@ -28,6 +29,7 @@ module.exports = {
2829
'food-light': '#FFC780',
2930
'websites-light': '#4dff99',
3031
'tools-light': '#F0DFFF',
32+
'feat-light': '#d8b4fe',
3133
'newspaper-background': '#fdfdf5',
3234
'sidebar-highlight': '#FA8072', // Duplicated from article
3335
'sidebar-highlight-light': '#FFB6C1', // Duplicated from article-light
@@ -46,6 +48,8 @@ module.exports = {
4648
'dnd-card-bg-hover': 'var(--bg-dnd-card-hover)',
4749
'gist-card-bg': 'var(--bg-gist-card)',
4850
'gist-card-bg-hover': 'var(--bg-gist-card-hover)',
51+
'feat-card-bg': 'var(--bg-feat-card)',
52+
'feat-card-bg-hover': 'var(--bg-feat-card-hover)',
4953
'book-alpha-10': 'rgba(0, 191, 255, 0.1)',
5054
'book-alpha-50': 'rgba(0, 191, 255, 0.5)',
5155
'movie-alpha-10': 'rgba(220, 20, 60, 0.1)',
@@ -66,6 +70,8 @@ module.exports = {
6670
'websites-alpha-50': 'rgba(0, 255, 127, 0.5)',
6771
'tools-alpha-10': 'rgba(224, 170, 255, 0.1)',
6872
'tools-alpha-50': 'rgba(224, 170, 255, 0.5)',
73+
'feat-alpha-10': 'rgba(168, 85, 247, 0.1)',
74+
'feat-alpha-50': 'rgba(168, 85, 247, 0.5)',
6975

7076
// Toast success colors
7177
'toast-background': 'rgba(72,59,87,0.8)',

src/index.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ code {
115115
--bg-gist-card-hover: rgba(217, 119, 6, 0.2);
116116
--title-hover-gist: #fbbf24; /* amber-400 */
117117

118+
/*feat card*/
119+
--color-feat-badge: #6b21a8; /* purple-800 */
120+
--bg-feat-card: rgba(107, 33, 168, 0.175);
121+
--bg-feat-card-hover: rgba(126, 34, 206, 0.275);
122+
--title-hover-feat: #a855f7; /* purple-500 */
123+
118124
/*fezccode colors*/
119125
--fzcdx-background: #ffffff;
120126
--fzcdx-text-primary: #2d2d2d;

src/pages/BlogPage.js

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -188,43 +188,47 @@ const BlogPage = () => {
188188
/>
189189
</div>
190190
{/* Filter Buttons */}
191-
<div className="mt-8 flex justify-center space-x-4">
192-
<button
193-
onClick={() => setActiveFilter('all')}
194-
className={`px-4 py-2 rounded-full text-sm font-medium ${activeFilter === 'all' ? 'bg-primary-500 text-white' : 'bg-gray-700 text-gray-300 hover:bg-gray-600'}`}
195-
>
196-
All
197-
</button>
198-
<button
199-
onClick={() => setActiveFilter('dev')}
200-
className={`px-4 py-2 rounded-full text-sm font-medium ${activeFilter === 'dev' ? 'bg-primary-500 text-white' : 'bg-gray-700 text-gray-300 hover:bg-gray-600'}`}
201-
>
202-
Dev
203-
</button>
204-
<button
205-
onClick={() => setActiveFilter('rant')}
206-
className={`px-4 py-2 rounded-full text-sm font-medium ${activeFilter === 'rant' ? 'bg-primary-500 text-white' : 'bg-gray-700 text-gray-300 hover:bg-gray-600'}`}
207-
>
208-
Rant
209-
</button>
210-
<button
211-
onClick={() => setActiveFilter('series')}
212-
className={`px-4 py-2 rounded-full text-sm font-medium ${activeFilter === 'series' ? 'bg-primary-500 text-white' : 'bg-gray-700 text-gray-300 hover:bg-gray-600'}`}
213-
>
214-
Series
215-
</button>
216-
<button
217-
onClick={() => setActiveFilter('gist')}
218-
className={`px-4 py-2 rounded-full text-sm font-medium ${activeFilter === 'gist' ? 'bg-primary-500 text-white' : 'bg-gray-700 text-gray-300 hover:bg-gray-600'}`}
219-
>
220-
Gist
221-
</button>
222-
<button
223-
onClick={() => setActiveFilter('d&d')}
224-
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'}`}
225-
>
226-
D&D
227-
</button>
191+
<div className="mt-8 flex flex-wrap justify-center gap-2">
192+
{[
193+
{ id: 'all', label: 'All' },
194+
{ id: 'dev', label: 'Dev' },
195+
{ id: 'feat', label: 'Feat' },
196+
{ id: 'rant', label: 'Rant' },
197+
{ id: 'series', label: 'Series' },
198+
{ id: 'gist', label: 'Gist' },
199+
{ id: 'd&d', label: 'D&D' },
200+
].map((filter) => (
201+
<button
202+
key={filter.id}
203+
onClick={() => setActiveFilter(filter.id)}
204+
className={`px-4 py-2 rounded-full text-sm font-medium transition-colors duration-200 ${
205+
activeFilter === filter.id
206+
? 'text-white shadow-md'
207+
: 'bg-gray-800 text-gray-400 hover:bg-gray-700 hover:text-white'
208+
}`}
209+
style={{
210+
backgroundColor:
211+
activeFilter === filter.id
212+
? filter.id === 'all'
213+
? '#4b5563' // gray-600 for All
214+
: filter.id === 'series'
215+
? 'var(--color-series-badge)'
216+
: filter.id === 'd&d'
217+
? 'var(--color-dnd-badge)'
218+
: filter.id === 'gist'
219+
? 'var(--color-gist-badge)'
220+
: filter.id === 'feat'
221+
? 'var(--color-feat-badge)'
222+
: filter.id === 'rant'
223+
? 'var(--color-takes-badge)'
224+
: `var(--color-${filter.id}-badge)` // Dynamic for dev
225+
: undefined,
226+
color: activeFilter === filter.id && filter.id === 'gist' ? 'black' : undefined
227+
}}
228+
>
229+
{filter.label}
230+
</button>
231+
))}
228232
</div>
229233
</div>
230234
<div className="mt-16">

0 commit comments

Comments
 (0)