From fc241f24021aa9bb09510bd1338be9c8574456d3 Mon Sep 17 00:00:00 2001 From: seaHi Date: Sun, 27 Sep 2026 15:48:41 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E7=AE=A1=E7=90=86=E5=B8=83=E5=B1=80=E5=B9=B6=E5=BC=95?= =?UTF-8?q?=E5=85=A5=E4=BE=A7=E8=BE=B9=E6=A0=8F=E5=AF=BC=E8=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/admin/+layout.svelte | 515 ++++++++++++++++++++++++++------ 1 file changed, 426 insertions(+), 89 deletions(-) diff --git a/src/routes/admin/+layout.svelte b/src/routes/admin/+layout.svelte index 3649b6a..18fe090 100644 --- a/src/routes/admin/+layout.svelte +++ b/src/routes/admin/+layout.svelte @@ -2,135 +2,472 @@ import { resolve } from '$app/paths'; import { page } from '$app/stores'; - import { ExternalLink } from '@lucide/svelte'; + import { + ExternalLink, + Menu, + Plus, + LayoutDashboard, + FileText, + AppWindow, + FolderTree, + Library, + Tags, + Image as ImageIcon, + Settings, + Circle + } from '@lucide/svelte'; import Toast from '$lib/components/Toast.svelte'; import ConfirmDialog from '$lib/components/ConfirmDialog.svelte'; let { children } = $props(); - let scrolled = $state(false); + let isMobileSidebarOpen = $state(false); $effect(() => { - const handleScroll = () => { - scrolled = window.scrollY > 50; - }; - window.addEventListener('scroll', handleScroll); - return () => { - window.removeEventListener('scroll', handleScroll); - }; + // Close sidebar on route change on mobile + const unsubscribe = page.subscribe(() => { + isMobileSidebarOpen = false; + }); + return () => unsubscribe(); }); + + function handleOverlayClick() { + isMobileSidebarOpen = false; + } 后台管理 - {$page.data.site?.title || 'BlogFlare'} -
-
-
-
- {@render children()} + + + + + +
+
+ + +
+ + +
+ +
+
+ {@render children()} +
+
-
+