Skip to content

Commit 112f0c1

Browse files
committed
feat: Enhance PostCard component with improved shadow effects and typography for better visual appeal
1 parent 5c91608 commit 112f0c1

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

src/app/globals.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,24 @@ body {
292292
box-shadow var(--transition-normal);
293293
}
294294

295+
/* Post card glow - default light mode shadows */
296+
.post-card-glow {
297+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
298+
}
299+
300+
.post-card-glow:hover {
301+
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
302+
}
303+
304+
/* Dark mode amber glow override - balanced */
305+
.dark .post-card-glow {
306+
box-shadow: 0 3px 12px rgba(255, 140, 66, 0.25);
307+
}
308+
309+
.dark .post-card-glow:hover {
310+
box-shadow: 0 4px 16px rgba(255, 140, 66, 0.3);
311+
}
312+
295313
/* Accessibility: Respect user's motion preferences */
296314
@media (prefers-reduced-motion: reduce) {
297315
:root {

src/components/PostCard.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function PostCard({ post }: PostCardProps) {
1212
const postUrl = urlPaths.post(post.date, post.slug);
1313

1414
return (
15-
<article className="bg-[var(--card)] rounded-lg border border-[var(--border)] overflow-hidden shadow-lg hover:shadow-xl transition-shadow duration-200">
15+
<article className="bg-[var(--card)] rounded-lg border border-[var(--border)] overflow-hidden post-card-glow transition-all duration-300 theme-transition">
1616

1717
{post.featured_image && (
1818
<Link href={postUrl} className="block">
@@ -30,7 +30,7 @@ export function PostCard({ post }: PostCardProps) {
3030
)}
3131

3232
<div className="p-6">
33-
<div className="flex items-center gap-2 mb-3 text-sm text-[var(--muted-2)]">
33+
<div className="flex items-center gap-2 mb-3 text-sm font-medium text-[var(--text-tertiary)]">
3434
<time dateTime={post.date}>
3535
{formatDate(post.date)}
3636
</time>
@@ -41,7 +41,7 @@ export function PostCard({ post }: PostCardProps) {
4141
<h2 className="text-xl font-semibold text-[var(--foreground)] mb-3">
4242
<Link
4343
href={postUrl}
44-
className="hover:text-[var(--link)] transition-colors"
44+
className="hover:text-[var(--link)] transition-all duration-300"
4545
>
4646
{post.title}
4747
</Link>
@@ -59,7 +59,7 @@ export function PostCard({ post }: PostCardProps) {
5959
<Link
6060
key={tag}
6161
href={urlPaths.tag(tag)}
62-
className="inline-block px-3 py-1 bg-[var(--chip-bg)] text-[var(--chip-text)] rounded-full text-sm hover:bg-[var(--surface-hover)] transition-colors"
62+
className="inline-block px-3 py-1 bg-[var(--chip-bg)] text-[var(--chip-text)] rounded-full text-sm font-medium hover:bg-[var(--surface-hover)] transition-all duration-300"
6363
>
6464
{tag}
6565
</Link>
@@ -68,7 +68,7 @@ export function PostCard({ post }: PostCardProps) {
6868

6969
<Link
7070
href={postUrl}
71-
className="text-[var(--link)] hover:text-[var(--link-hover)] font-medium text-sm transition-colors"
71+
className="text-[var(--link)] hover:text-[var(--link-hover)] font-semibold text-sm transition-all duration-300 hover:scale-105"
7272
>
7373
Read more →
7474
</Link>

0 commit comments

Comments
 (0)