Skip to content

Commit b867f2f

Browse files
committed
[feat] 更新布局,添加侧边栏和页脚,移除不必要的配置,优化页面结构
1 parent 03d337f commit b867f2f

File tree

4 files changed

+31
-503
lines changed

4 files changed

+31
-503
lines changed

app/layout.tsx

+31-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import { AntdRegistry } from "@ant-design/nextjs-registry";
2+
import { Layout, Menu } from "antd";
3+
import { Content, Footer, Header } from "antd/es/layout/layout";
4+
import Sider from "antd/es/layout/Sider";
25
import type { Metadata } from "next";
36
import "./globals.css";
47

@@ -12,7 +15,34 @@ export default function RootLayout({ children }: Readonly<{ children: React.Reac
1215
<html lang="zh-Hans">
1316
<body className="antialiased">
1417
<AntdRegistry>
15-
{children}
18+
<Layout className="!min-h-screen antialiased">
19+
<Sider theme="light" collapsible>
20+
<div className="text-center py-4 text-xl">VoiceGrid</div>
21+
22+
<Menu defaultSelectedKeys={['1']} mode="inline" items={[
23+
{
24+
key: "1",
25+
label: "Datasets",
26+
}
27+
]} />
28+
</Sider>
29+
30+
<Layout>
31+
<Header className="!bg-white">
32+
123
33+
</Header>
34+
35+
<Content className="m-4">
36+
<div className="p-6 min-h-80 bg-white rounded-lg">
37+
{children}
38+
</div>
39+
</Content>
40+
41+
<Footer className="text-center">
42+
SoarCraft ©{new Date().getFullYear()} Part of CheersYou
43+
</Footer>
44+
</Layout>
45+
</Layout>
1646
</AntdRegistry>
1747
</body>
1848
</html>

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
},
1212
"dependencies": {
1313
"@ant-design/nextjs-registry": "^1.0.2",
14-
"@ant-design/pro-components": "^2.8.5",
1514
"ahooks": "^3.8.4",
1615
"antd": "^5.24.0",
1716
"next": "15.1.7",

0 commit comments

Comments
 (0)