forge
Explore
Log in

Don't you dare go Hollow

💄 tighten dashboard and navigation layout

Browse files at this commit

cb8e4ff70d61bc444c0a2f85f69bccb6c61d73e3Burak BoduroğluParent: 7c6d289
  • style
    • 💄 tighten dashboard and navigation layout
Show full message
style: 💄 tighten dashboard and navigation layout

- remove the role summary panel from the dashboard

- keep dashboard greeting and guide action above KPI cards

- move notes and events after the report card in sidebar navigation

- remove the add-exam action from the exams page header

- make normal page headers more compact while keeping dashboard compact unchanged

- reshape notes page into a full-width create form with a wider notes grid
src/components/layout/page-header.tsxmodified+4 -4
@@ -42,17 +42,17 @@ export function PageHeader(
4242 "relative flex flex-col sm:flex-row sm:items-center sm:justify-between",
4343 props.compact
4444 ? "gap-3 px-4 py-3 sm:px-5 sm:py-3.5"
45- : "gap-4 p-6 sm:items-end sm:p-8",
45+ : "gap-3 px-4 py-4 sm:items-end sm:px-5 sm:py-5",
4646 )}
4747 >
48- <div class={cn("min-w-0", props.compact ? "space-y-0.5" : "max-w-2xl space-y-1.5")}>
48+ <div class={cn("min-w-0", props.compact ? "space-y-0.5" : "max-w-2xl space-y-1")}>
4949 <Show when={props.eyebrow && !props.compact}>
5050 <p class="text-xs font-medium text-muted-foreground">{props.eyebrow}</p>
5151 </Show>
5252 <h1
5353 class={cn(
5454 "font-display font-semibold tracking-tight",
55- props.compact ? "text-lg sm:text-xl" : "text-2xl sm:text-3xl",
55+ props.compact ? "text-lg sm:text-xl" : "text-xl sm:text-2xl",
5656 )}
5757 >
5858 {props.title}
@@ -61,7 +61,7 @@ export function PageHeader(
6161 <p
6262 class={cn(
6363 "text-muted-foreground",
64- props.compact ? "text-xs sm:text-sm" : "text-sm sm:text-base",
64+ props.compact ? "text-xs sm:text-sm" : "text-sm",
6565 )}
6666 >
6767 {props.description}
src/components/layout/side-nav.tsxmodified+2 -3
@@ -26,11 +26,11 @@ type NavItem = {
2626
2727 const MAIN_ITEMS: NavItem[] = [
2828 { to: "/", labelKey: "nav.home", Icon: IconHome, exact: true },
29- { to: "/notes", labelKey: "nav.notes", Icon: IconNote },
30- { to: "/events", labelKey: "nav.events", Icon: IconCalendar },
3129 { to: "/courses", labelKey: "nav.courses", Icon: IconBook },
3230 { to: "/exams", labelKey: "nav.exams", Icon: IconExam },
3331 { to: "/marks", labelKey: "nav.marks", Icon: IconChart },
32+ { to: "/notes", labelKey: "nav.notes", Icon: IconNote },
33+ { to: "/events", labelKey: "nav.events", Icon: IconCalendar },
3434 { to: "/admin/users", labelKey: "nav.users", Icon: IconUsers, adminOnly: true },
3535 ];
3636
@@ -119,7 +119,6 @@ export function SideNav(props: { onNavigate?: () => void; collapsed?: boolean })
119119 </For>
120120 </div>
121121
122- {/* Guide sits just above the sidebar footer */}
123122 <div class="mt-auto border-t border-border px-2 pb-1 pt-2">
124123 <NavLink item={GUIDE_ITEM} collapsed={props.collapsed} onNavigate={props.onNavigate} />
125124 </div>
src/components/notes/note-list.tsxmodified+1 -1
@@ -17,7 +17,7 @@ export function NoteList(props: {
1717 </div>
1818 }
1919 >
20- <ul class="grid gap-4 sm:grid-cols-2 xl:grid-cols-2">
20+ <ul class="grid gap-4 sm:grid-cols-2 xl:grid-cols-3">
2121 <For each={props.notes}>
2222 {(note) => (
2323 <li class="animate-fade-up">
src/pages/dashboard-page.tsxmodified+0 -4
@@ -8,7 +8,6 @@ import { formatApiError } from "@/api/client";
88 import type { Event, Exam, Note } from "@/api/types";
99 import { RouteGuard } from "@/components/layout/route-guard";
1010 import { PageHeader } from "@/components/layout/page-header";
11-import { RoleHomePanel } from "@/components/dashboard/role-home-panel";
1211 import { Alert } from "@/components/ui/alert";
1312 import { Badge } from "@/components/ui/badge";
1413 import { Button } from "@/components/ui/button";
@@ -64,7 +63,6 @@ function DashboardContent() {
6463
6564 return (
6665 <div class="space-y-5">
67- {/* Compact greeting + guide */}
6866 <PageHeader
6967 compact
7068 accent="mint"
@@ -79,8 +77,6 @@ function DashboardContent() {
7977 }
8078 />
8179
82- <RoleHomePanel role={user().role} />
83-
8480 <Show when={resourceError()}>
8581 {(msg) => <Alert variant="destructive">{msg()}</Alert>}
8682 </Show>
src/pages/exams-page.tsxmodified+0 -8
@@ -8,7 +8,6 @@ import { PageHeader } from "@/components/layout/page-header";
88 import { CollapsibleHelp } from "@/components/ui/collapsible-help";
99 import { Alert } from "@/components/ui/alert";
1010 import { Badge } from "@/components/ui/badge";
11-import { Button } from "@/components/ui/button";
1211 import { formatApiError } from "@/api/client";
1312 import { IconChevronRight } from "@/components/ui/icons";
1413 import { PageSpinner } from "@/components/ui/page-spinner";
@@ -66,13 +65,6 @@ function ExamsContent() {
6665 eyebrow={t("nav.exams")}
6766 title={t("exams.title")}
6867 description={t("exams.subtitle")}
69- actions={
70- canCreate() ? (
71- <Link to="/courses">
72- <Button>{t("courses.addExam")}</Button>
73- </Link>
74- ) : undefined
75- }
7668 />
7769
7870 <CollapsibleHelp title={t("exams.helpTitle")}>
src/pages/notes-page.tsxmodified+4 -4
@@ -47,9 +47,9 @@ function NotesContent() {
4747
4848 <CollapsibleHelp title={t("notes.helpTitle")}>{t("notes.helpBody")}</CollapsibleHelp>
4949
50- <div class="grid gap-6 lg:grid-cols-[minmax(0,22rem)_1fr]">
51- <section class="surface-card h-fit p-5 lg:sticky lg:top-24">
52- <h2 class="mb-4 font-display text-lg font-semibold">{t("notes.new")}</h2>
50+ <div class="space-y-5">
51+ <section class="surface-card p-4 sm:p-5">
52+ <h2 class="mb-3 font-display text-lg font-semibold">{t("notes.new")}</h2>
5353 <NoteForm
5454 submitLabel={t("common.create")}
5555 onSubmit={(values) =>
@@ -64,7 +64,7 @@ function NotesContent() {
6464 {error() && <p class="mt-3 text-sm text-destructive">{error()}</p>}
6565 </section>
6666
67- <section>
67+ <section class="min-w-0">
6868 <Suspense fallback={<PageSpinner />}>
6969 <Show when={notes.error}>
7070 <Alert variant="destructive">{formatApiError(notes.error)}</Alert>