From c16683aa263ff89a613f70194f6d75b41c7aed07 Mon Sep 17 00:00:00 2001 From: TianKai Ma Date: Wed, 2 Sep 2026 19:53:14 +0800 Subject: [PATCH] feat(shell): add campus weather link to sidebar catalog Place the weather entry below links and second classroom (young events) in both the desktop catalog group and the mobile secondary navigation. --- src/lib/components/shell/AppShell.svelte | 11 +++++++++++ src/lib/shell/layout-server-data.ts | 3 +++ 2 files changed, 14 insertions(+) diff --git a/src/lib/components/shell/AppShell.svelte b/src/lib/components/shell/AppShell.svelte index 00bfa6e23..81b2b495d 100644 --- a/src/lib/components/shell/AppShell.svelte +++ b/src/lib/components/shell/AppShell.svelte @@ -6,6 +6,7 @@ import CableIcon from "@lucide/svelte/icons/cable"; import CalendarDaysIcon from "@lucide/svelte/icons/calendar-days"; import ChartBarIcon from "@lucide/svelte/icons/chart-bar"; import ClipboardCheckIcon from "@lucide/svelte/icons/clipboard-check"; +import CloudSunIcon from "@lucide/svelte/icons/cloud-sun"; import CompassIcon from "@lucide/svelte/icons/compass"; import GavelIcon from "@lucide/svelte/icons/gavel"; import GraduationCapIcon from "@lucide/svelte/icons/graduation-cap"; @@ -216,6 +217,11 @@ function buildShellNavGroups( icon: SparklesIcon, label: copy.nav.youngEvents, }, + { + href: "/catalog/weather", + icon: CloudSunIcon, + label: copy.nav.weather, + }, { href: "/news", icon: ScrollTextIcon, label: copy.nav.news }, ]; const usageLinks: ShellLink[] = [ @@ -402,6 +408,11 @@ function buildMobileSecondaryNavGroups( icon: SparklesIcon, label: copy.nav.youngEvents, }, + { + href: "/catalog/weather", + icon: CloudSunIcon, + label: copy.nav.weather, + }, { href: "/news", icon: ScrollTextIcon, diff --git a/src/lib/shell/layout-server-data.ts b/src/lib/shell/layout-server-data.ts index be440c3b2..c46258251 100644 --- a/src/lib/shell/layout-server-data.ts +++ b/src/lib/shell/layout-server-data.ts @@ -15,6 +15,7 @@ const layoutMessages = { publications: enUsMessages.publications, profile: enUsMessages.profile, theme: enUsMessages.theme, + weather: enUsMessages.weather, youngEvents: enUsMessages.youngEvents, }, "zh-cn": { @@ -30,6 +31,7 @@ const layoutMessages = { publications: zhCnMessages.publications, profile: zhCnMessages.profile, theme: zhCnMessages.theme, + weather: zhCnMessages.weather, youngEvents: zhCnMessages.youngEvents, }, }; @@ -70,6 +72,7 @@ export function buildLayoutCopy(locale: LayoutLocale) { news: messages.publications.title, todos: messages.meDashboard.nav.todos.title, transitMap: messages.metadata.pages.busMap, + weather: messages.weather.title, youngEvents: messages.youngEvents.title, mobileApp: messages.metadata.pages.mobileApp, prestoBot: messages.metadata.pages.prestoBot,