Skip to content

Commit 9226059

Browse files
committed
coloring
1 parent 9e7da09 commit 9226059

File tree

4 files changed

+32
-5
lines changed

4 files changed

+32
-5
lines changed

src/components/LogCard.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,38 +30,47 @@ const categoryStyles = {
3030
Book: {
3131
backgroundColor: colors['book-alpha-10'],
3232
borderColor: colors['book-alpha-50'],
33+
textColor: colors.book,
3334
},
3435
Movie: {
3536
backgroundColor: colors['movie-alpha-10'],
3637
borderColor: colors['movie-alpha-50'],
38+
textColor: colors.movie,
3739
},
3840
Game: {
3941
backgroundColor: colors['game-alpha-10'],
4042
borderColor: colors['game-alpha-50'],
43+
textColor: colors.game,
4144
},
4245
Article: {
4346
backgroundColor: colors['article-alpha-10'],
4447
borderColor: colors['article-alpha-50'],
48+
textColor: colors.article,
4549
},
4650
Music: {
4751
backgroundColor: colors['music-alpha-10'],
4852
borderColor: colors['music-alpha-50'],
53+
textColor: colors.music,
4954
},
5055
Series: {
5156
backgroundColor: colors['series-alpha-10'],
5257
borderColor: colors['series-alpha-50'],
58+
textColor: colors.series,
5359
},
5460
Food: {
5561
backgroundColor: colors['food-alpha-10'],
5662
borderColor: colors['food-alpha-50'],
63+
textColor: colors.food,
5764
},
5865
Websites: {
5966
backgroundColor: colors['websites-alpha-10'],
6067
borderColor: colors['websites-alpha-50'],
68+
textColor: colors.websites,
6169
},
6270
Tools: {
6371
backgroundColor: colors['tools-alpha-10'],
6472
borderColor: colors['tools-alpha-50'],
73+
textColor: colors.tools,
6574
},
6675
};
6776

@@ -83,6 +92,7 @@ const LogCard = ({ log, index, totalLogs }) => {
8392
} = log;
8493

8594
const cardStyle = categoryStyles[category] || {};
95+
const detailTextColor = colors[category.toLowerCase() + '-light'];
8696

8797
const renderStars = (rating) => {
8898
const stars = [];
@@ -120,15 +130,16 @@ const LogCard = ({ log, index, totalLogs }) => {
120130
<div>
121131
<div className="flex items-center justify-between mb-4">
122132
<div className="flex items-center">
123-
<div className="text-2xl mr-4">{categoryIcons[category]}</div>
133+
<div className="text-2xl mr-4" style={{ color: detailTextColor }}>{categoryIcons[category]}</div>
124134
<h2
125-
className={`text-xl font-normal group-hover:text-${category.toLowerCase()}`}
135+
className={`text-xl font-normal`}
136+
style={{ color: cardStyle.textColor }}
126137
>
127138
{title}
128139
</h2>
129140
</div>
130141
</div>
131-
<div className="text-sm text-gray-400 mb-4">
142+
<div className="text-sm mb-4" style={{ color: detailTextColor }}>
132143
{author && <div>Author: {author}</div>}
133144
{director && <div>Director: {director}</div>}
134145
{platform && <div>Platform: {platform}</div>}

src/config/colors.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ module.exports = {
1616
food: '#84cc16', // lime-500
1717
websites: '#f472b6', // pink-400
1818
tools: '#facc15', // yellow-400
19+
'book-light': '#93c5fd', // blue-300
20+
'movie-light': '#fca5a5', // red-300
21+
'game-light': '#86efac', // green-300
22+
'article-light': '#fdba74', // orange-300
23+
'music-light': '#d8b4fe', // purple-300
24+
'series-light': '#fbcfe8', // pink-300
25+
'food-light': '#bef264', // lime-300
26+
'websites-light': '#f9a8d4', // pink-300
27+
'tools-light': '#fde047', // yellow-300
1928
'title-hover': '#fdd4a6', // orange-200
2029
'markdown-title-color': '#fed7aa', // orange-200
2130
'markdown-hx-color': '#ffedd5', // orange-100

src/index.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,17 @@ code {
7272
--color-takes-badge: #065f46; /* emerald-800 */
7373
--color-series-badge: #e11d48; /* rose-600 */
7474
--color-dnd-badge: #583fa3; /* violet-400 */
75+
--fzcdx-background: #ffffff;
76+
--fzcdx-text-primary: #2d2d2d;
77+
--fzcdx-text-secondary: #4b5563;
78+
--fzcdx-primary: #f87171;
79+
--fzcdx-secondary: #fb923c;
80+
--fzcdx-accent: #34d399;
81+
--fzcdx-spanner: #e89b5d;
7582
}
7683

7784
@media (max-width: 768px) {
7885
body {
7986
font-family: serif !important;
8087
}
81-
}
88+
}

src/pages/BlogPage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ const BlogPage = () => {
150150
<ArrowLeftIcon className="text-xl" /> Back to Home
151151
</Link>
152152
<h1 className="text-4xl font-semibold tracking-tight text-white sm:text-6xl">
153-
From the Blog
153+
From the <span style={{ color: 'var(--fzcdx-spanner)' }}>Blog</span>
154154
</h1>
155155
<p className="mt-6 text-lg leading-8 text-gray-300">
156156
Catch up on the latest news and insights.

0 commit comments

Comments
 (0)