From 9af328eb6b3bce86a0450450ee0a08ce2c318eb8 Mon Sep 17 00:00:00 2001 From: Leo dev Date: Tue, 3 Feb 2026 15:27:57 +0100 Subject: [PATCH] Stat card hover animations and problem card quick run --- src/app/globals.css | 1 - src/app/problems/components/ProblemCard.tsx | 28 +++++++++++++++------ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/app/globals.css b/src/app/globals.css index 94ebdb5..9b4f79b 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -215,7 +215,6 @@ } .card-hover:hover { - @apply -translate-y-1; box-shadow: 0 10px 40px color-mix(in oklch, var(--primary) 15%, transparent); } diff --git a/src/app/problems/components/ProblemCard.tsx b/src/app/problems/components/ProblemCard.tsx index 60481d2..f15dc44 100644 --- a/src/app/problems/components/ProblemCard.tsx +++ b/src/app/problems/components/ProblemCard.tsx @@ -9,7 +9,14 @@ interface ProblemCardProps { index?: number; } -const ProblemCard = ({ name, difficulty, tags, bestTime, attempts, index = 0 }: ProblemCardProps) => { +const ProblemCard = ({ + name, + difficulty, + tags, + bestTime, + attempts, + index = 0, +}: ProblemCardProps) => { const difficultyStyles = { easy: "diff-easy", medium: "diff-medium", @@ -23,20 +30,25 @@ const ProblemCard = ({ name, difficulty, tags, bestTime, attempts, index = 0 }: }; return ( -
{/* Glow effect on hover */}
- +
{/* Header */}

{name}

- + {difficultyLabels[difficulty]}
@@ -44,8 +56,8 @@ const ProblemCard = ({ name, difficulty, tags, bestTime, attempts, index = 0 }: {/* Tags */}
{tags.map((tag) => ( - {tag} @@ -68,7 +80,7 @@ const ProblemCard = ({ name, difficulty, tags, bestTime, attempts, index = 0 }:
{/* Quick run button - appears on hover */} -
+