forge
Explore
Log in

Don't you dare go Hollow

🎨 enforce design tokens, remove display serif, and refactor semantic status colors

Browse files at this commit

5b5dcc6755602c07e8251396eedffc551b07aecaBurak BoduroğluParent: 8ade4f3
  • style
    • 🎨 enforce design tokens, remove display serif, and refactor semantic status colors
Show full message
style: 🎨 enforce design tokens, remove display serif, and refactor semantic status colors

- remove Fraunces font from tailwind config and index.css to enforce DM Sans across data and admin pages

- refactor Ask Celebi button in app-shell to use primary semantic token instead of hardcoded sky blue

- update attendance and schedule status mappers to use theme semantic variables (success, destructive, warning, info)

- replace hardcoded green/red/sky/rose/emerald classes in answer sheet, exam room WS, live monitor, and messages with semantic CSS tokens
src/components/exams/answer-sheet-view.tsxmodified+4 -4
@@ -59,7 +59,7 @@ export function AnswerSheetView(props: { examId: string; userId: string }) {
59 <Show when={row.answer?.is_correct != null}>59 <Show when={row.answer?.is_correct != null}>
60 <Badge variant="outline" class={cn(60 <Badge variant="outline" class={cn(
61 "size-[22px] p-0 flex items-center justify-center",61 "size-[22px] p-0 flex items-center justify-center",
62- row.answer?.is_correct ? "border-green-300 bg-green-50 text-green-700 dark:border-green-700 dark:bg-green-950/30 dark:text-green-400" : "border-red-300 bg-red-50 text-red-700 dark:border-red-700 dark:bg-red-950/30 dark:text-red-400",62+ row.answer?.is_correct ? "border-success/50 bg-success/10 text-success" : "border-destructive/50 bg-destructive/10 text-destructive",
63 )}>63 )}>
64 <Show when={row.answer?.is_correct} fallback={<IconX class="h-3 w-3" />}>64 <Show when={row.answer?.is_correct} fallback={<IconX class="h-3 w-3" />}>
65 <IconCheck class="h-3 w-3" />65 <IconCheck class="h-3 w-3" />
@@ -90,9 +90,9 @@ export function AnswerSheetView(props: { examId: string; userId: string }) {
90 <div90 <div
91 class={`flex items-center gap-2 rounded-sm border px-3 py-2 text-sm ${91 class={`flex items-center gap-2 rounded-sm border px-3 py-2 text-sm ${
92 ci() === row.question.correct && ci() === row.answer?.selected92 ci() === row.question.correct && ci() === row.answer?.selected
93- ? "border-green-500 bg-green-50 dark:bg-green-950/30"93+ ? "border-success bg-success/10"
94 : ci() === row.question.correct94 : ci() === row.question.correct
95- ? "border-green-300 bg-green-50/50 dark:bg-green-950/20"95+ ? "border-success/50 bg-success/5"
96 : ci() === row.answer?.selected96 : ci() === row.answer?.selected
97 ? "border-destructive bg-destructive/10"97 ? "border-destructive bg-destructive/10"
98 : "border-border"98 : "border-border"
@@ -106,7 +106,7 @@ export function AnswerSheetView(props: { examId: string; userId: string }) {
106 <Badge variant="destructive" class="ml-auto text-[10px]">✗</Badge>106 <Badge variant="destructive" class="ml-auto text-[10px]">✗</Badge>
107 </Show>107 </Show>
108 {ci() === row.question.correct && (108 {ci() === row.question.correct && (
109- <Badge variant="outline" class="ml-auto border-green-300 bg-green-50 text-green-700 text-[10px] dark:border-green-700 dark:bg-green-950/30 dark:text-green-400">109+ <Badge variant="outline" class="ml-auto border-success/50 bg-success/10 text-success text-[10px]">
110 <IconCheck class="h-3 w-3" />110 <IconCheck class="h-3 w-3" />
111 </Badge>111 </Badge>
112 )}112 )}
src/components/exams/exam-room-ws.tsxmodified+2 -2
@@ -286,9 +286,9 @@ export function ExamRoomWS(props: { exam: Exam }) {
286 {(att) => (286 {(att) => (
287 <Switch>287 <Switch>
288 <Match when={att().status === "submitted"}>288 <Match when={att().status === "submitted"}>
289- <div class="rounded-lg border border-sky-500/30 bg-sky-500/10 px-4 py-3">289+ <div class="rounded-lg border border-info/30 bg-info/10 px-4 py-3">
290 <div class="flex items-start gap-3">290 <div class="flex items-start gap-3">
291- <IconAlert class="mt-0.5 h-5 w-5 shrink-0 text-sky-500" />291+ <IconAlert class="mt-0.5 h-5 w-5 shrink-0 text-info" />
292 <div class="min-w-0 space-y-1">292 <div class="min-w-0 space-y-1">
293 <p class="text-sm font-semibold text-foreground">{t("attempt.submitted")}</p>293 <p class="text-sm font-semibold text-foreground">{t("attempt.submitted")}</p>
294 <p class="text-sm text-muted-foreground">{t("attempt.closed")}</p>294 <p class="text-sm text-muted-foreground">{t("attempt.closed")}</p>
src/components/layout/app-shell.tsxmodified+1 -1
@@ -147,7 +147,7 @@ export function AppShell(props: ParentProps) {
147 <div class="min-w-0 rounded-lg border bg-card px-3 py-1.5 text-xs font-medium text-muted-foreground shadow-sm">147 <div class="min-w-0 rounded-lg border bg-card px-3 py-1.5 text-xs font-medium text-muted-foreground shadow-sm">
148 <span class="block truncate">{routeLabel()}</span>148 <span class="block truncate">{routeLabel()}</span>
149 </div>149 </div>
150- <Button type="button" variant="outline" size="sm" class="rounded-lg border-sky-500/30 bg-sky-500/10 text-sky-700 shadow-sm hover:bg-sky-500/15 dark:text-sky-300" onClick={() => setCelebiOpen(true)}>150+ <Button type="button" variant="outline" size="sm" class="rounded-lg border-primary/30 bg-primary/10 text-primary shadow-sm hover:bg-primary/15" onClick={() => setCelebiOpen(true)}>
151 <IconSparkles class="h-4 w-4" />151 <IconSparkles class="h-4 w-4" />
152 {t("ai.askCelebi")}152 {t("ai.askCelebi")}
153 </Button>153 </Button>
src/index.cssmodified+1 -1
@@ -1,4 +1,4 @@
1-@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&display=swap");1+@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap");
2 2
3 @tailwind base;3 @tailwind base;
4 @tailwind components;4 @tailwind components;
src/lib/attendance-status.tsmodified+4 -4
@@ -6,25 +6,25 @@ export const ATTENDANCE_STATUSES: { value: CoreAttendanceStatus; key: MessageKey
6 value: "present",6 value: "present",
7 key: "status.present",7 key: "status.present",
8 detailKey: "status.presentDetail",8 detailKey: "status.presentDetail",
9- class: "border-emerald-500/25 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",9+ class: "border-success/30 bg-success/10 text-success",
10 },10 },
11 {11 {
12 value: "absent",12 value: "absent",
13 key: "status.absent",13 key: "status.absent",
14 detailKey: "status.absentDetail",14 detailKey: "status.absentDetail",
15- class: "border-rose-500/25 bg-rose-500/10 text-rose-700 dark:text-rose-300",15+ class: "border-destructive/30 bg-destructive/10 text-destructive",
16 },16 },
17 {17 {
18 value: "late",18 value: "late",
19 key: "status.late",19 key: "status.late",
20 detailKey: "status.lateDetail",20 detailKey: "status.lateDetail",
21- class: "border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",21+ class: "border-warning/30 bg-warning/10 text-warning",
22 },22 },
23 {23 {
24 value: "excused",24 value: "excused",
25 key: "status.excused",25 key: "status.excused",
26 detailKey: "status.excusedDetail",26 detailKey: "status.excusedDetail",
27- class: "border-sky-500/25 bg-sky-500/10 text-sky-700 dark:text-sky-300",27+ class: "border-info/30 bg-info/10 text-info",
28 },28 },
29 ];29 ];
30 30
src/lib/schedule-status.tsmodified+8 -8
@@ -11,24 +11,24 @@ export type ScheduleStatus =
11 11
12 export function scheduleStatusClass(status: ScheduleStatus | string): string {12 export function scheduleStatusClass(status: ScheduleStatus | string): string {
13 if (status === "active") {13 if (status === "active") {
14- return "border-sky-500/30 bg-sky-500/10 text-sky-700 dark:text-sky-300";14+ return "border-info/30 bg-info/10 text-info";
15 }15 }
16 if (status === "submitted") {16 if (status === "submitted") {
17- return "border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300";17+ return "border-success/30 bg-success/10 text-success";
18 }18 }
19 if (status === "today" || status === "upcoming" || status === "soon") {19 if (status === "today" || status === "upcoming" || status === "soon") {
20- return "border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300";20+ return "border-warning/30 bg-warning/10 text-warning";
21 }21 }
22 if (status === "finished" || status === "past") {22 if (status === "finished" || status === "past") {
23- return "border-rose-500/30 bg-rose-500/10 text-rose-700 dark:text-rose-300";23+ return "border-destructive/30 bg-destructive/10 text-destructive";
24 }24 }
25 return "border-muted bg-muted/50 text-muted-foreground";25 return "border-muted bg-muted/50 text-muted-foreground";
26 }26 }
27 27
28 export function scheduleStatusDotClass(status: ScheduleStatus | string): string {28 export function scheduleStatusDotClass(status: ScheduleStatus | string): string {
29- if (status === "active") return "bg-sky-600";29+ if (status === "active") return "bg-info";
30- if (status === "submitted") return "bg-emerald-600";30+ if (status === "submitted") return "bg-success";
31- if (status === "today" || status === "upcoming" || status === "soon") return "bg-amber-600";31+ if (status === "today" || status === "upcoming" || status === "soon") return "bg-warning";
32- if (status === "finished" || status === "past") return "bg-rose-600";32+ if (status === "finished" || status === "past") return "bg-destructive";
33 return "bg-muted-foreground";33 return "bg-muted-foreground";
34 }34 }
src/pages/live-monitor-page.tsxmodified+4 -4
@@ -337,16 +337,16 @@ function LiveMonitorContent() {
337 <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconClock class="h-3.5 w-3.5" />{t("exams.notStarted")}</p><p class="mt-1 font-display text-2xl font-semibold tabular-nums">{counts.not_started}</p>337 <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconClock class="h-3.5 w-3.5" />{t("exams.notStarted")}</p><p class="mt-1 font-display text-2xl font-semibold tabular-nums">{counts.not_started}</p>
338 </div>338 </div>
339 <div class="surface-card bg-card/80 p-3">339 <div class="surface-card bg-card/80 p-3">
340- <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconExam class="h-3.5 w-3.5 text-sky-700 dark:text-sky-300" />{t("attempt.inProgress")}</p><p class="mt-1 font-display text-2xl font-semibold tabular-nums">{counts.in_progress}</p>340+ <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconExam class="h-3.5 w-3.5 text-info" />{t("attempt.inProgress")}</p><p class="mt-1 font-display text-2xl font-semibold tabular-nums">{counts.in_progress}</p>
341 </div>341 </div>
342 <div class="surface-card bg-card/80 p-3">342 <div class="surface-card bg-card/80 p-3">
343- <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconCheck class="h-3.5 w-3.5 text-emerald-700 dark:text-emerald-300" />{t("attempt.submitted")}</p><p class="mt-1 font-display text-2xl font-semibold tabular-nums">{counts.submitted}</p>343+ <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconCheck class="h-3.5 w-3.5 text-success" />{t("attempt.submitted")}</p><p class="mt-1 font-display text-2xl font-semibold tabular-nums">{counts.submitted}</p>
344 </div>344 </div>
345 <div class="surface-card bg-card/80 p-3">345 <div class="surface-card bg-card/80 p-3">
346- <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconClock class="h-3.5 w-3.5 text-rose-700 dark:text-rose-300" />{t("attempt.expired")}</p><p class="mt-1 font-display text-2xl font-semibold tabular-nums">{counts.expired}</p>346+ <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconClock class="h-3.5 w-3.5 text-destructive" />{t("attempt.expired")}</p><p class="mt-1 font-display text-2xl font-semibold tabular-nums">{counts.expired}</p>
347 </div>347 </div>
348 <div class="surface-card bg-card/80 p-3">348 <div class="surface-card bg-card/80 p-3">
349- <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconAlert class="h-3.5 w-3.5 text-rose-700 dark:text-rose-300" />{t("attempt.noAttemptsLeft")}</p><p class="mt-1 font-display text-2xl font-semibold tabular-nums">{counts.no_attempts_left}</p>349+ <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconAlert class="h-3.5 w-3.5 text-destructive" />{t("attempt.noAttemptsLeft")}</p><p class="mt-1 font-display text-2xl font-semibold tabular-nums">{counts.no_attempts_left}</p>
350 </div>350 </div>
351 <div class="surface-card bg-card/80 p-3">351 <div class="surface-card bg-card/80 p-3">
352 <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconUsers class="h-3.5 w-3.5" />{t("attempt.absent")}</p><p class="mt-1 font-display text-2xl font-semibold tabular-nums">{counts.absent}</p>352 <p class="flex items-center gap-1.5 text-xs text-muted-foreground"><IconUsers class="h-3.5 w-3.5" />{t("attempt.absent")}</p><p class="mt-1 font-display text-2xl font-semibold tabular-nums">{counts.absent}</p>
src/pages/messages-page.tsxmodified+1 -1
@@ -123,7 +123,7 @@ export default function MessagesPage() {
123 <div class="flex items-center gap-2">123 <div class="flex items-center gap-2">
124 <span class="truncate font-semibold">{message.from}</span>124 <span class="truncate font-semibold">{message.from}</span>
125 <Show when={message.unread}>125 <Show when={message.unread}>
126- <span class="h-2 w-2 rounded-full bg-sky-500" />126+ <span class="h-2 w-2 rounded-full bg-primary" />
127 </Show>127 </Show>
128 </div>128 </div>
129 <p class="mt-1 truncate text-xs font-medium">{message.subject}</p>129 <p class="mt-1 truncate text-xs font-medium">{message.subject}</p>
tailwind.config.jsmodified+1 -1
@@ -6,7 +6,7 @@ export default {
6 extend: {6 extend: {
7 fontFamily: {7 fontFamily: {
8 sans: ['"DM Sans"', "system-ui", "sans-serif"],8 sans: ['"DM Sans"', "system-ui", "sans-serif"],
9- display: ['"Fraunces"', "Georgia", "serif"],9+ display: ['"DM Sans"', "system-ui", "sans-serif"],
10 },10 },
11 container: {11 container: {
12 center: true,12 center: true,