From 9d29927812e562618f8fca375038bacbb6e11aa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Wed, 22 Jul 2026 23:11:27 +0300 Subject: [PATCH] =?UTF-8?q?style:=20=F0=9F=8E=A8=20refine=20calendar=20and?= =?UTF-8?q?=20schedule=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - update calendar page layout and schedule item styling - adjust event and exam page presentation details --- src/pages/calendar-page.tsx | 255 ++++++++++++++++++------------------ src/pages/events-page.tsx | 2 +- src/pages/exams-page.tsx | 17 +-- 3 files changed, 140 insertions(+), 134 deletions(-) diff --git a/src/pages/calendar-page.tsx b/src/pages/calendar-page.tsx index ff177a2..29bc831 100644 --- a/src/pages/calendar-page.tsx +++ b/src/pages/calendar-page.tsx @@ -6,7 +6,6 @@ import { RouteGuard } from "@/components/layout/route-guard"; import { PageHeader } from "@/components/layout/page-header"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; -import { EmptyState } from "@/components/ui/empty-state"; import { PageSpinner } from "@/components/ui/page-spinner"; import { IconCalendarDays, IconChevronLeft, IconChevronRight } from "@/components/ui/icons"; import { cn } from "@/lib/cn"; @@ -127,138 +126,144 @@ function CalendarContent() { - }> -
-
-
- - {(name) => ( -
- {name} -
- )} -
-
-
- - {(cell) => { - const key = cell.other ? "" : dateKey(new Date(viewYear(), viewMonth(), cell.day)); - const items = () => cell.other ? null : itemsByDay().get(key); - const cellToday = !cell.other && isToday(cell.day); - const cellSelected = () => !cell.other && key === selectedKey(); - return ( - - ); - }} - + + {cell.day || ""} + + + {(dayItems) => ( +
+ + {(event) => ( + + + {event().title} + 1}> + +{dayItems().events.length - 1} + + + )} + + + {(exam) => ( + + + {exam().title} + 1}> + +{dayItems().exams.length - 1} + + + )} + +
+ )} +
+ + ); + }} + +
-
-
-
- - - {t("calendar.events")} - - - - {t("calendar.exams")} - -
+
+
+

+ {selectedDay().toLocaleDateString(locale() === "tr" ? "tr-TR" : "en-US", { day: "numeric", month: "long", year: "numeric" })} +

- 0 || selectedItems().exams.length > 0} - fallback={ - - } - > -
-

- {selectedDay().toLocaleDateString(locale() === "tr" ? "tr-TR" : "en-US", { weekday: "long", month: "long", day: "numeric" })} -

- - {(event) => ( - - -
-

{event.title}

-

- {event.starts_at ? new Date(event.starts_at).toLocaleTimeString(locale() === "tr" ? "tr-TR" : "en-US", { hour: "2-digit", minute: "2-digit" }) : ""} - {event.ends_at ? ` — ${new Date(event.ends_at).toLocaleTimeString(locale() === "tr" ? "tr-TR" : "en-US", { hour: "2-digit", minute: "2-digit" })}` : ""} -

-
- {t("calendar.events")} -
- )} -
- - {(exam) => ( - - -
-

{exam.title}

-

- {exam.starts_at ? new Date(exam.starts_at).toLocaleTimeString(locale() === "tr" ? "tr-TR" : "en-US", { hour: "2-digit", minute: "2-digit" }) : ""} - {exam.ends_at ? ` — ${new Date(exam.ends_at).toLocaleTimeString(locale() === "tr" ? "tr-TR" : "en-US", { hour: "2-digit", minute: "2-digit" })}` : ""} -

-
- {t("calendar.exams")} -
- )} -
+
-
+
-
-
+ + ); } diff --git a/src/pages/events-page.tsx b/src/pages/events-page.tsx index e8f4972..4538dc4 100644 --- a/src/pages/events-page.tsx +++ b/src/pages/events-page.tsx @@ -195,7 +195,7 @@ function EventsContent() { {error()} -
+
}> {formatApiError(list.error)} diff --git a/src/pages/exams-page.tsx b/src/pages/exams-page.tsx index fd22397..d5f25e1 100644 --- a/src/pages/exams-page.tsx +++ b/src/pages/exams-page.tsx @@ -260,7 +260,7 @@ function ExamsContent() {
-
- - {flash()} - - - {error()} - + + {flash()} + + + {error()} + + +
}> {formatApiError(list.error)}