Skip to content

Commit 6a98a7c

Browse files
Edwin ChanEdwin Chan
authored andcommitted
fix colors
1 parent 6acedf8 commit 6a98a7c

2 files changed

Lines changed: 33 additions & 15 deletions

File tree

app/dashboard/page.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type StudentSetRow = {
4343
sortPriority: number;
4444
};
4545

46-
const ACCENTS = ["cyan", "purple", "pink", "orange"] as const;
46+
const ACCENTS = ["cyan", "purple", "pink", "orange", "black", "grey"] as const;
4747

4848
export default async function DashboardPage() {
4949
const session = await getServerSession(authOptions);
@@ -361,7 +361,7 @@ export default async function DashboardPage() {
361361
<p className="eyebrow">
362362
{currentUser.role === "ADMIN" ? "Teacher view" : "Student view"}
363363
</p>
364-
<h1>Training Dashboard</h1>
364+
<h1>training dashboard</h1>
365365
</div>
366366
<div className="topbar-actions">
367367
<ThemeToggle />
@@ -379,11 +379,11 @@ export default async function DashboardPage() {
379379
<Link className="primary-action" href={continueHref}>
380380
{currentUser.role === "ADMIN"
381381
? nextSet
382-
? "Continue"
383-
: "Open import"
382+
? "continue"
383+
: "open import"
384384
: nextSet
385-
? "Continue"
386-
: "Browse sets"}
385+
? "continue"
386+
: "browse sets"}
387387
<ArrowRight size={18} />
388388
</Link>
389389
</div>
@@ -439,16 +439,16 @@ export default async function DashboardPage() {
439439
</section>
440440

441441
<section className="metric-grid" aria-label="Student progress metrics">
442-
<MetricCard label="Today" value={nextSet ? "Next step" : "setup"} accent="orange" />
442+
<MetricCard label="Today" value={nextSet ? "next step" : "setup"} accent="grey" />
443443
<MetricCard
444444
label="Attempted"
445445
value={`${completedSets}/${totalSets || 0}`}
446-
accent="cyan"
446+
accent="grey"
447447
/>
448-
<MetricCard label="Average" value={`${averageScore}%`} accent="purple" />
449-
<MetricCard label="Latest score" value={`${latestScore}%`} accent="pink" />
448+
<MetricCard label="Average" value={`${averageScore}%`} accent="grey" />
449+
<MetricCard label="Latest score" value={`${latestScore}%`} accent="grey" />
450450
{currentUser.role === "ADMIN" ? (
451-
<MetricCard label="Open reports" value={`${openReports}`} accent="orange" />
451+
<MetricCard label="Open reports" value={`${openReports}`} accent="grey" />
452452
) : null}
453453
</section>
454454

@@ -457,7 +457,7 @@ export default async function DashboardPage() {
457457
<div className="panel-header">
458458
<div>
459459
<p className="eyebrow">Student view</p>
460-
<h2>Problem sets</h2>
460+
<h2>problem sets</h2>
461461
</div>
462462
{nextSet ? (
463463
<Link className="text-link" href={`/problem-sets/${nextSet.slug}`}>
@@ -507,7 +507,7 @@ export default async function DashboardPage() {
507507
<div className="panel-header">
508508
<div>
509509
<p className="eyebrow">Strengths</p>
510-
<h2>Topic map</h2>
510+
<h2>topic map</h2>
511511
</div>
512512
<Sparkles size={20} />
513513
</div>
@@ -543,7 +543,7 @@ export default async function DashboardPage() {
543543
<p className="eyebrow">
544544
{currentUser.role === "ADMIN" ? "Teacher view" : "Recent activity"}
545545
</p>
546-
<h2>{currentUser.role === "ADMIN" ? "Cohort snapshot" : "Attempt history"}</h2>
546+
<h2>{currentUser.role === "ADMIN" ? "cohort snapshot" : "attempt history"}</h2>
547547
</div>
548548
{currentUser.role === "ADMIN" ? (
549549
<Link className="secondary-action compact" href="/admin/import">
@@ -630,7 +630,7 @@ function MetricCard({
630630
}: {
631631
label: string;
632632
value: string;
633-
accent: "cyan" | "purple" | "pink" | "orange";
633+
accent: "cyan" | "purple" | "pink" | "orange" | "black" | "grey";
634634
}) {
635635
return (
636636
<article className={`metric-card accent-${accent}`}>

app/globals.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
--color-success: #77bb00;
1919
--color-warning: #ffaa33;
2020
--color-danger: #ee4455;
21+
--color-black: #111111;
22+
--color-grey: #6f6f7f;
2123
--shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05);
2224
--shadow-strong: 0 8px 24px rgba(0, 0, 0, 0.1);
2325
--radius-card: 16px;
@@ -476,6 +478,14 @@ table {
476478
border-top-color: var(--color-orange);
477479
}
478480

481+
.accent-black {
482+
border-top-color: var(--color-black);
483+
}
484+
485+
.accent-grey {
486+
border-top-color: var(--color-grey);
487+
}
488+
479489
.content-grid,
480490
.problem-layout,
481491
.import-layout {
@@ -641,6 +651,14 @@ table {
641651
background: var(--color-orange);
642652
}
643653

654+
.fill-black {
655+
background: var(--color-black);
656+
}
657+
658+
.fill-grey {
659+
background: var(--color-grey);
660+
}
661+
644662
.table-panel {
645663
margin-top: 18px;
646664
}

0 commit comments

Comments
 (0)