Skip to content

Commit 9538d43

Browse files
author
AI Assistant
committed
style: improve contrast of unselected cards and fix progress ring visibility
1 parent d87a07c commit 9538d43

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

frontend/src/app/components/LearningDashboard.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ export function LearningDashboard() {
8686
const done = item.lessons.filter((entry) => completedSet.has(`${item.id}:${entry.id}`)).length;
8787
const isActive = item.id === course.id;
8888
return (
89-
<button key={item.id} onClick={() => { setCourseId(item.id); setLessonId(item.lessons[0].id); }} className={`group relative overflow-hidden rounded-3xl border p-6 text-left transition-all duration-300 hover:-translate-y-1 hover:shadow-[0_15px_40px_rgba(220,38,38,0.15)] ${isActive ? "border-red-500/40 bg-red-500/10 shadow-[0_0_30px_rgba(220,38,38,0.1)]" : "border-white/5 bg-white/[0.02] hover:bg-white/5"}`}>
89+
<button key={item.id} onClick={() => { setCourseId(item.id); setLessonId(item.lessons[0].id); }} className={`group relative overflow-hidden rounded-3xl border p-6 text-left transition-all duration-300 hover:-translate-y-1 hover:shadow-[0_15px_40px_rgba(220,38,38,0.15)] ${isActive ? "border-red-500/40 bg-red-500/10 shadow-[0_0_30px_rgba(220,38,38,0.1)]" : "border-white/10 bg-white/5 hover:border-white/20 hover:bg-white/10"}`}>
9090
{isActive && <div className="absolute inset-0 bg-gradient-to-br from-red-600/10 to-transparent" />}
9191
<div className="relative z-10">
92-
<ProgressRing percentage={(done / item.lessons.length) * 100} accent={isActive ? "text-red-500" : "text-red-500/50"} />
92+
<ProgressRing percentage={(done / item.lessons.length) * 100} accent={isActive ? "stroke-red-500" : "stroke-red-900/50"} />
9393
<h2 className="mt-5 text-2xl font-black tracking-tight text-white">{item.title}</h2>
94-
<p className="mt-2 text-sm text-gray-400 leading-relaxed">{item.description}</p>
95-
<div className="mt-4 inline-flex items-center gap-2 rounded-full bg-white/5 px-3 py-1 text-xs font-bold uppercase tracking-widest text-gray-300">
94+
<p className="mt-2 text-sm text-gray-400 leading-relaxed group-hover:text-gray-300 transition-colors">{item.description}</p>
95+
<div className="mt-4 inline-flex items-center gap-2 rounded-full bg-white/10 px-3 py-1 text-xs font-bold uppercase tracking-widest text-gray-200">
9696
<span className={isActive ? "text-red-400" : "text-gray-500"}>{done}/{item.lessons.length}</span> lessons
9797
</div>
9898
</div>

frontend/src/app/components/ProgressRing.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ export function ProgressRing({ percentage, accent }: ProgressRingProps) {
1212
return (
1313
<div className="relative grid size-24 place-items-center">
1414
<svg className="size-24 -rotate-90" viewBox="0 0 96 96" aria-hidden="true">
15-
<circle cx="48" cy="48" r={radius} fill="none" stroke="rgba(15, 23, 42, 0.1)" strokeWidth="10" />
15+
<circle cx="48" cy="48" r={radius} fill="none" className="stroke-white/10" strokeWidth="10" />
1616
<circle
1717
cx="48"
1818
cy="48"
1919
r={radius}
2020
fill="none"
21-
stroke={accent}
21+
className={accent}
2222
strokeLinecap="round"
2323
strokeWidth="10"
2424
strokeDasharray={circumference}
2525
strokeDashoffset={offset}
2626
style={{ transition: "stroke-dashoffset 700ms ease" }}
2727
/>
2828
</svg>
29-
<span className="absolute text-lg font-black text-slate-950">{Math.round(normalized)}%</span>
29+
<span className="absolute text-lg font-black text-white">{Math.round(normalized)}%</span>
3030
</div>
3131
);
3232
}

0 commit comments

Comments
 (0)