🧹 drop dead PageHeader accent prop, unify tint + heading
Browse files at this commit1faead3f80233b8ce2c5de2ac18fd18de8d344b2Parent: c584a3d- refactor
- 🧹 drop dead PageHeader accent prop, unify tint + heading
25 changed files +11 -28
- src/components/appointments/book-appointment-form.tsx +1 -1
- src/components/appointments/publish-slots-form.tsx +1 -1
- src/components/events/event-form.tsx +1 -1
- src/components/exams/exam-form.tsx +1 -1
- src/components/layout/page-header.tsx +0 -3
- src/pages/admin-users-page.tsx +1 -1
- src/pages/course-detail-page.tsx +1 -2
- src/pages/event-detail-page.tsx +0 -1
- src/pages/exam-detail-page.tsx +0 -1
- src/pages/exam-room-page.tsx +0 -1
- src/pages/exams-page.tsx +1 -1
- src/pages/guide-page.tsx +0 -1
- src/pages/homework-detail-page.tsx +0 -1
- src/pages/live-monitor-page.tsx +0 -1
- src/pages/meal-detail-page.tsx +0 -1
- src/pages/meals-page.tsx +1 -1
- src/pages/my-students-page.tsx +1 -1
- src/pages/notes-page.tsx +0 -1
- src/pages/payment-statement-page.tsx +0 -1
- src/pages/payments-page.tsx +1 -1
- src/pages/pomodoro-page.tsx +0 -1
- src/pages/question-detail-page.tsx +1 -1
- src/pages/questions-page.tsx +0 -1
- src/pages/settings-page.tsx +0 -1
- src/pages/terms-page.tsx +0 -1
src/components/appointments/book-appointment-form.tsxmodified+1 -1
| @@ -42,7 +42,7 @@ export function BookAppointmentForm(props: { | |||
| 42 | 42 | ||
| 43 | return ( | 43 | return ( |
| 44 | <form class="space-y-4" onSubmit={handleSubmit}> | 44 | <form class="space-y-4" onSubmit={handleSubmit}> |
| 45 | - <div class="space-y-1.5 rounded-2xl border border-sky-500/15 bg-sky-500/3 p-4 text-sm"> | 45 | + <div class="space-y-1.5 rounded-2xl border border-sky-500/15 bg-sky-500/2.5 p-4 text-sm"> |
| 46 | <p> | 46 | <p> |
| 47 | <span class="text-muted-foreground">{t("appointments.teacher")}:</span>{" "} | 47 | <span class="text-muted-foreground">{t("appointments.teacher")}:</span>{" "} |
| 48 | <span class="font-medium">{personLabel(props.slot.teacher)}</span> | 48 | <span class="font-medium">{personLabel(props.slot.teacher)}</span> |
src/components/appointments/publish-slots-form.tsxmodified+1 -1
| @@ -116,7 +116,7 @@ export function PublishSlotsForm(props: { | |||
| 116 | </div> | 116 | </div> |
| 117 | </div> | 117 | </div> |
| 118 | 118 | ||
| 119 | - <div class="space-y-1.5 rounded-2xl border border-sky-500/15 bg-sky-500/3 p-4"> | 119 | + <div class="space-y-1.5 rounded-2xl border border-sky-500/15 bg-sky-500/2.5 p-4"> |
| 120 | <Label for="slot-note">{t("appointments.note")}</Label> | 120 | <Label for="slot-note">{t("appointments.note")}</Label> |
| 121 | <Textarea | 121 | <Textarea |
| 122 | id="slot-note" | 122 | id="slot-note" |
src/components/events/event-form.tsxmodified+1 -1
| @@ -172,7 +172,7 @@ export function EventForm(props: { | |||
| 172 | return ( | 172 | return ( |
| 173 | <> | 173 | <> |
| 174 | <form class="space-y-4" onSubmit={handleSubmit}> | 174 | <form class="space-y-4" onSubmit={handleSubmit}> |
| 175 | - <div class="space-y-3 rounded-2xl border border-sky-500/15 bg-sky-500/3 p-4 shadow-xs"> | 175 | + <div class="space-y-3 rounded-2xl border border-sky-500/15 bg-sky-500/2.5 p-4 shadow-xs"> |
| 176 | <div class="space-y-1.5"> | 176 | <div class="space-y-1.5"> |
| 177 | <Label for="event-title">{t("form.title")}</Label> | 177 | <Label for="event-title">{t("form.title")}</Label> |
| 178 | <Input | 178 | <Input |
src/components/exams/exam-form.tsxmodified+1 -1
| @@ -206,7 +206,7 @@ export function ExamForm(props: { | |||
| 206 | <> | 206 | <> |
| 207 | <form class="space-y-4" onSubmit={handleSubmit}> | 207 | <form class="space-y-4" onSubmit={handleSubmit}> |
| 208 | {/* Section 1: Basic Info */} | 208 | {/* Section 1: Basic Info */} |
| 209 | - <div class="space-y-3 rounded-2xl border border-sky-500/15 bg-sky-500/3 p-4 shadow-xs"> | 209 | + <div class="space-y-3 rounded-2xl border border-sky-500/15 bg-sky-500/2.5 p-4 shadow-xs"> |
| 210 | <h3 class="text-xs font-semibold uppercase tracking-wider text-muted-foreground">{t("exams.sectionBasic")}</h3> | 210 | <h3 class="text-xs font-semibold uppercase tracking-wider text-muted-foreground">{t("exams.sectionBasic")}</h3> |
| 211 | <div class="space-y-1.5"> | 211 | <div class="space-y-1.5"> |
| 212 | <Label for="exam-title">{t("form.title")}</Label> | 212 | <Label for="exam-title">{t("form.title")}</Label> |
src/components/layout/page-header.tsxmodified+0 -3
| @@ -2,14 +2,11 @@ import type { JSX, ParentProps } from "solid-js"; | |||
| 2 | import { Show } from "solid-js"; | 2 | import { Show } from "solid-js"; |
| 3 | import { cn } from "@/lib/cn"; | 3 | import { cn } from "@/lib/cn"; |
| 4 | 4 | ||
| 5 | -export type PageAccent = "mint" | "sky" | "amber" | "violet" | "rose"; | ||
| 6 | - | ||
| 7 | export function PageHeader( | 5 | export function PageHeader( |
| 8 | props: ParentProps<{ | 6 | props: ParentProps<{ |
| 9 | eyebrow?: string; | 7 | eyebrow?: string; |
| 10 | title: string; | 8 | title: string; |
| 11 | description?: string; | 9 | description?: string; |
| 12 | - accent?: PageAccent; | ||
| 13 | actions?: JSX.Element; | 10 | actions?: JSX.Element; |
| 14 | class?: string; | 11 | class?: string; |
| 15 | /** Compact greeting strip (dashboard). */ | 12 | /** Compact greeting strip (dashboard). */ |
src/pages/admin-users-page.tsxmodified+1 -1
| @@ -54,7 +54,7 @@ function AdminUsersContent() { | |||
| 54 | return ( | 54 | return ( |
| 55 | <div class="space-y-6"> | 55 | <div class="space-y-6"> |
| 56 | <div class="space-y-2"> | 56 | <div class="space-y-2"> |
| 57 | - <PageHeader accent="violet" eyebrow={t("nav.users")} title={t("admin.title")} description={t("admin.subtitle")} /> | 57 | + <PageHeader eyebrow={t("nav.users")} title={t("admin.title")} description={t("admin.subtitle")} /> |
| 58 | </div> | 58 | </div> |
| 59 | 59 | ||
| 60 | <Show when={flash()}> | 60 | <Show when={flash()}> |
src/pages/course-detail-page.tsxmodified+1 -2
| @@ -287,7 +287,6 @@ function CourseDetailContent() { | |||
| 287 | <span class="text-foreground">{c().title}</span> | 287 | <span class="text-foreground">{c().title}</span> |
| 288 | </nav> | 288 | </nav> |
| 289 | <PageHeader | 289 | <PageHeader |
| 290 | - accent="violet" | ||
| 291 | title={c().title} | 290 | title={c().title} |
| 292 | description={c().description || "—"} | 291 | description={c().description || "—"} |
| 293 | class="border-violet-500/30 shadow-sm" | 292 | class="border-violet-500/30 shadow-sm" |
| @@ -410,7 +409,7 @@ function CourseDetailContent() { | |||
| 410 | }, t("common.saved")); | 409 | }, t("common.saved")); |
| 411 | }} | 410 | }} |
| 412 | > | 411 | > |
| 413 | - <div class="space-y-3 rounded-2xl border border-sky-500/15 bg-sky-500/3 p-4 shadow-xs"> | 412 | + <div class="space-y-3 rounded-2xl border border-sky-500/15 bg-sky-500/2.5 p-4 shadow-xs"> |
| 414 | <div class="space-y-1.5"> | 413 | <div class="space-y-1.5"> |
| 415 | <Label for="edit-course-title">{t("form.title")}</Label> | 414 | <Label for="edit-course-title">{t("form.title")}</Label> |
| 416 | <Input | 415 | <Input |
src/pages/event-detail-page.tsxmodified+0 -1
| @@ -167,7 +167,6 @@ function EventDetailContent() { | |||
| 167 | <div class="space-y-6"> | 167 | <div class="space-y-6"> |
| 168 | <div class="space-y-2"> | 168 | <div class="space-y-2"> |
| 169 | <PageHeader | 169 | <PageHeader |
| 170 | - accent="sky" | ||
| 171 | eyebrow={t("events.title")} | 170 | eyebrow={t("events.title")} |
| 172 | title={ev().title} | 171 | title={ev().title} |
| 173 | description={ev().description || "—"} | 172 | description={ev().description || "—"} |
src/pages/exam-detail-page.tsxmodified+0 -1
| @@ -391,7 +391,6 @@ function ExamDetailContent() { | |||
| 391 | <span class="text-foreground">{ex().title}</span> | 391 | <span class="text-foreground">{ex().title}</span> |
| 392 | </nav> | 392 | </nav> |
| 393 | <PageHeader | 393 | <PageHeader |
| 394 | - accent="rose" | ||
| 395 | title={ex().title} | 394 | title={ex().title} |
| 396 | description={ex().description || "—"} | 395 | description={ex().description || "—"} |
| 397 | class="border-rose-500/30 shadow-sm" | 396 | class="border-rose-500/30 shadow-sm" |
src/pages/exam-room-page.tsxmodified+0 -1
| @@ -62,7 +62,6 @@ function ExamRoomContent() { | |||
| 62 | <div class="space-y-2"> | 62 | <div class="space-y-2"> |
| 63 | <PageHeader | 63 | <PageHeader |
| 64 | compact | 64 | compact |
| 65 | - accent="rose" | ||
| 66 | eyebrow={t("attempt.title")} | 65 | eyebrow={t("attempt.title")} |
| 67 | title={ex().title} | 66 | title={ex().title} |
| 68 | description={ex().description || undefined} | 67 | description={ex().description || undefined} |
src/pages/exams-page.tsxmodified+1 -1
| @@ -390,7 +390,7 @@ function ExamsContent() { | |||
| 390 | 390 | ||
| 391 | <Show when={createStep() === "details"}> | 391 | <Show when={createStep() === "details"}> |
| 392 | <Show when={!createdExam()}> | 392 | <Show when={!createdExam()}> |
| 393 | - <div class="mb-4 space-y-1.5 rounded-2xl border border-sky-500/15 bg-sky-500/3 p-4"> | 393 | + <div class="mb-4 space-y-1.5 rounded-2xl border border-sky-500/15 bg-sky-500/2.5 p-4"> |
| 394 | <label class="text-sm font-medium" for="exam-course"> | 394 | <label class="text-sm font-medium" for="exam-course"> |
| 395 | {t("exams.selectCourse")} | 395 | {t("exams.selectCourse")} |
| 396 | </label> | 396 | </label> |
src/pages/guide-page.tsxmodified+0 -1
| @@ -140,7 +140,6 @@ function GuideContent() { | |||
| 140 | return ( | 140 | return ( |
| 141 | <div class="space-y-6"> | 141 | <div class="space-y-6"> |
| 142 | <PageHeader | 142 | <PageHeader |
| 143 | - accent="sky" | ||
| 144 | eyebrow={t("nav.guide")} | 143 | eyebrow={t("nav.guide")} |
| 145 | title={t("guide.title")} | 144 | title={t("guide.title")} |
| 146 | description="Kampüs akışı: Rol yetkileri, modül kullanım adımları ve pratik çalışma ipuçları." | 145 | description="Kampüs akışı: Rol yetkileri, modül kullanım adımları ve pratik çalışma ipuçları." |
src/pages/homework-detail-page.tsxmodified+0 -1
| @@ -48,7 +48,6 @@ export default function HomeworkDetailPage() { | |||
| 48 | {(item) => ( | 48 | {(item) => ( |
| 49 | <div class="space-y-6"> | 49 | <div class="space-y-6"> |
| 50 | <PageHeader | 50 | <PageHeader |
| 51 | - accent="amber" | ||
| 52 | eyebrow={t("homework.item")} | 51 | eyebrow={t("homework.item")} |
| 53 | title={item().title} | 52 | title={item().title} |
| 54 | description={item().description || undefined} | 53 | description={item().description || undefined} |
src/pages/live-monitor-page.tsxmodified+0 -1
| @@ -268,7 +268,6 @@ function LiveMonitorContent() { | |||
| 268 | <div class="space-y-2"> | 268 | <div class="space-y-2"> |
| 269 | <PageHeader | 269 | <PageHeader |
| 270 | compact | 270 | compact |
| 271 | - accent="rose" | ||
| 272 | eyebrow={isFinished() ? t("exams.finalState") : t("exams.liveMonitor")} | 271 | eyebrow={isFinished() ? t("exams.finalState") : t("exams.liveMonitor")} |
| 273 | title={ex().title} | 272 | title={ex().title} |
| 274 | description={isFinished() ? t("exams.finalStateDesc") : t("exams.liveMonitorDesc")} | 273 | description={isFinished() ? t("exams.finalStateDesc") : t("exams.liveMonitorDesc")} |
src/pages/meal-detail-page.tsxmodified+0 -1
| @@ -158,7 +158,6 @@ function MealDetailContent() { | |||
| 158 | {(current) => ( | 158 | {(current) => ( |
| 159 | <div class="space-y-5"> | 159 | <div class="space-y-5"> |
| 160 | <PageHeader | 160 | <PageHeader |
| 161 | - accent="violet" | ||
| 162 | eyebrow={`${current().date} · ${current().slot}`} | 161 | eyebrow={`${current().date} · ${current().slot}`} |
| 163 | title={t("meals.menu")} | 162 | title={t("meals.menu")} |
| 164 | description={t("meals.detailHelp")} | 163 | description={t("meals.detailHelp")} |
src/pages/meals-page.tsxmodified+1 -1
| @@ -68,7 +68,7 @@ function MealsContent() { | |||
| 68 | 68 | ||
| 69 | return ( | 69 | return ( |
| 70 | <div class="space-y-5"> | 70 | <div class="space-y-5"> |
| 71 | - <PageHeader accent="violet" eyebrow={t("nav.group.community")} title={t("meals.title")} description={t("meals.subtitle")} actions={<Show when={canManage()}><Button size="sm" class="min-w-30 rounded-lg" onClick={() => { setNewSlot(settings()?.meal_slots[0]?.name ?? ""); setShowCreate(true); }}><IconPlus class="h-4 w-4" />{t("meals.publish")}</Button></Show>} /> | 71 | + <PageHeader eyebrow={t("nav.group.community")} title={t("meals.title")} description={t("meals.subtitle")} actions={<Show when={canManage()}><Button size="sm" class="min-w-30 rounded-lg" onClick={() => { setNewSlot(settings()?.meal_slots[0]?.name ?? ""); setShowCreate(true); }}><IconPlus class="h-4 w-4" />{t("meals.publish")}</Button></Show>} /> |
| 72 | <SidePanel open={showCreate()} onOpenChange={setShowCreate} title={t("meals.publish")} description={t("meals.publishHelp")}> | 72 | <SidePanel open={showCreate()} onOpenChange={setShowCreate} title={t("meals.publish")} description={t("meals.publishHelp")}> |
| 73 | <form class="space-y-4" onSubmit={publish}> | 73 | <form class="space-y-4" onSubmit={publish}> |
| 74 | <Show when={limits.error}><ErrorAlert message={formatApiError(limits.error)} onRetry={() => void refetchLimits()} /></Show> | 74 | <Show when={limits.error}><ErrorAlert message={formatApiError(limits.error)} onRetry={() => void refetchLimits()} /></Show> |
src/pages/my-students-page.tsxmodified+1 -1
| @@ -51,7 +51,7 @@ function MyStudentsContent() { | |||
| 51 | return ( | 51 | return ( |
| 52 | <div class="space-y-6"> | 52 | <div class="space-y-6"> |
| 53 | <div class="space-y-2"> | 53 | <div class="space-y-2"> |
| 54 | - <PageHeader accent="violet" eyebrow={t("nav.group.students")} title={t("nav.myStudents")} description={t("parents.subtitle")} /> | 54 | + <PageHeader eyebrow={t("nav.group.students")} title={t("nav.myStudents")} description={t("parents.subtitle")} /> |
| 55 | </div> | 55 | </div> |
| 56 | 56 | ||
| 57 | <Suspense fallback={<PageSpinner />}> | 57 | <Suspense fallback={<PageSpinner />}> |
src/pages/notes-page.tsxmodified+0 -1
| @@ -75,7 +75,6 @@ function NotesContent() { | |||
| 75 | <div class="space-y-6"> | 75 | <div class="space-y-6"> |
| 76 | <div class="space-y-2"> | 76 | <div class="space-y-2"> |
| 77 | <PageHeader | 77 | <PageHeader |
| 78 | - accent="amber" | ||
| 79 | eyebrow={t("nav.notes")} | 78 | eyebrow={t("nav.notes")} |
| 80 | title={t("notes.title")} | 79 | title={t("notes.title")} |
| 81 | description={t("notes.subtitle")} | 80 | description={t("notes.subtitle")} |
src/pages/payment-statement-page.tsxmodified+0 -1
| @@ -106,7 +106,6 @@ function StatementContent() { | |||
| 106 | return ( | 106 | return ( |
| 107 | <div class="space-y-6"> | 107 | <div class="space-y-6"> |
| 108 | <PageHeader | 108 | <PageHeader |
| 109 | - accent="violet" | ||
| 110 | eyebrow={t("nav.paymentStatement")} | 109 | eyebrow={t("nav.paymentStatement")} |
| 111 | title={t("payments.statementTitle")} | 110 | title={t("payments.statementTitle")} |
| 112 | description={t("payments.statementSubtitle")} | 111 | description={t("payments.statementSubtitle")} |
src/pages/payments-page.tsxmodified+1 -1
| @@ -440,7 +440,7 @@ function PaymentsContent() { | |||
| 440 | 440 | ||
| 441 | return ( | 441 | return ( |
| 442 | <div class="space-y-6"> | 442 | <div class="space-y-6"> |
| 443 | - <PageHeader accent="violet" eyebrow={t("nav.school")} title={t("payments.title")} description={t("payments.subtitle")} /> | 443 | + <PageHeader eyebrow={t("nav.school")} title={t("payments.title")} description={t("payments.subtitle")} /> |
| 444 | 444 | ||
| 445 | <Show when={flash()}> | 445 | <Show when={flash()}> |
| 446 | <Alert variant="success">{flash()}</Alert> | 446 | <Alert variant="success">{flash()}</Alert> |
src/pages/pomodoro-page.tsxmodified+0 -1
| @@ -103,7 +103,6 @@ function PomodoroContent() { | |||
| 103 | return ( | 103 | return ( |
| 104 | <div class="space-y-6"> | 104 | <div class="space-y-6"> |
| 105 | <PageHeader | 105 | <PageHeader |
| 106 | - accent="mint" | ||
| 107 | eyebrow={t("nav.pomodoro")} | 106 | eyebrow={t("nav.pomodoro")} |
| 108 | title={t("pomodoro.title")} | 107 | title={t("pomodoro.title")} |
| 109 | description={t("pomodoro.subtitle")} | 108 | description={t("pomodoro.subtitle")} |
src/pages/question-detail-page.tsxmodified+1 -1
| @@ -98,7 +98,7 @@ function QuestionDetailContent() { | |||
| 98 | <div class="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between"> | 98 | <div class="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between"> |
| 99 | <div> | 99 | <div> |
| 100 | <Button variant="link" class="px-0 h-auto text-muted-foreground mb-2" onClick={() => router.history.back()}>← {t("common.back")}</Button> | 100 | <Button variant="link" class="px-0 h-auto text-muted-foreground mb-2" onClick={() => router.history.back()}>← {t("common.back")}</Button> |
| 101 | - <h1 class="text-2xl font-bold font-display">{q().title}</h1> | 101 | + <h1 class="text-2xl font-semibold font-display">{q().title}</h1> |
| 102 | <div class="mt-2 flex items-center gap-2 text-sm text-muted-foreground"> | 102 | <div class="mt-2 flex items-center gap-2 text-sm text-muted-foreground"> |
| 103 | <span>{personLabel(q().asker)}</span> | 103 | <span>{personLabel(q().asker)}</span> |
| 104 | <span>•</span> | 104 | <span>•</span> |
src/pages/questions-page.tsxmodified+0 -1
| @@ -78,7 +78,6 @@ function QuestionsContent() { | |||
| 78 | return ( | 78 | return ( |
| 79 | <div class="space-y-6"> | 79 | <div class="space-y-6"> |
| 80 | <PageHeader | 80 | <PageHeader |
| 81 | - accent="violet" | ||
| 82 | eyebrow={t("nav.group.community")} | 81 | eyebrow={t("nav.group.community")} |
| 83 | title={t("pool.title")} | 82 | title={t("pool.title")} |
| 84 | description={t("pool.subtitle")} | 83 | description={t("pool.subtitle")} |
src/pages/settings-page.tsxmodified+0 -1
| @@ -141,7 +141,6 @@ function SettingsContent() { | |||
| 141 | return ( | 141 | return ( |
| 142 | <div class="space-y-6"> | 142 | <div class="space-y-6"> |
| 143 | <PageHeader | 143 | <PageHeader |
| 144 | - accent="violet" | ||
| 145 | eyebrow={t("nav.admin")} | 144 | eyebrow={t("nav.admin")} |
| 146 | title={t("settings.title")} | 145 | title={t("settings.title")} |
| 147 | description={t("settings.subtitle")} | 146 | description={t("settings.subtitle")} |
src/pages/terms-page.tsxmodified+0 -1
| @@ -166,7 +166,6 @@ function TermsContent() { | |||
| 166 | <div class="space-y-6"> | 166 | <div class="space-y-6"> |
| 167 | <div class="space-y-2"> | 167 | <div class="space-y-2"> |
| 168 | <PageHeader | 168 | <PageHeader |
| 169 | - accent="violet" | ||
| 170 | eyebrow={t("nav.admin")} | 169 | eyebrow={t("nav.admin")} |
| 171 | title={t("terms.title")} | 170 | title={t("terms.title")} |
| 172 | description={t("terms.subtitle")} | 171 | description={t("terms.subtitle")} |