31 lines
1.3 KiB
TypeScript
31 lines
1.3 KiB
TypeScript
import type { Metadata } from "next";
|
|
import "./globals.css";
|
|
import { Sidebar } from "@/components/layout/Sidebar";
|
|
import { BottomNav } from "@/components/layout/BottomNav";
|
|
|
|
export const metadata: Metadata = {
|
|
title: "NoteApp",
|
|
description: "一款支持多端同步、Markdown 编辑和标签管理的笔记应用。",
|
|
};
|
|
|
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
return (
|
|
<html lang="zh-CN">
|
|
<body className="bg-gray-50 min-h-screen">
|
|
<div className="flex">
|
|
{/* Desktop Sidebar */}
|
|
<Sidebar items={[{"name":"笔记列表","href":"/notes","icon":"🏠"},{"name":"笔记编辑","href":"/note/[id]","icon":"📋"},{"name":"标签管理","href":"/tags","icon":"📅"},{"name":"设置","href":"/settings","icon":"✏️"}] } projectName="NoteApp" />
|
|
{/* Main Content */}
|
|
<main className="flex-1 lg:pl-64 pb-20 lg:pb-0">
|
|
<div className="max-w-2xl mx-auto px-4 py-6">
|
|
{children}
|
|
</div>
|
|
</main>
|
|
</div>
|
|
{/* Mobile Bottom Nav */}
|
|
<BottomNav items={[{"name":"笔记列表","href":"/notes","icon":"🏠"},{"name":"笔记编辑","href":"/note/[id]","icon":"📋"},{"name":"标签管理","href":"/tags","icon":"📅"},{"name":"设置","href":"/settings","icon":"✏️"}] } />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|