Files
2026-06-06 10:40:48 +08:00

31 lines
1.4 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: "EduPlatform",
description: "一个支持在线课程学习、直播授课、题库练习和学情追踪的教育平台。",
};
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":"/home","icon":"🏠"},{"name":"课程发布","href":"/courses","icon":"📋"},{"name":"章节管理","href":"/chapters","icon":"📅"},{"name":"学员进度","href":"/students","icon":"✏️"},{"name":"作业批改","href":"/assignments","icon":"📸"}] } projectName="EduPlatform" />
{/* 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":"/home","icon":"🏠"},{"name":"课程发布","href":"/courses","icon":"📋"},{"name":"章节管理","href":"/chapters","icon":"📅"},{"name":"学员进度","href":"/students","icon":"✏️"}] } />
</body>
</html>
);
}