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'}
-