Implement project frontend page

This commit is contained in:
CPTProgrammer
2026-07-11 12:13:20 +08:00
parent b5555d5635
commit 8d23ae1823
11 changed files with 1483 additions and 6 deletions
+26
View File
@@ -0,0 +1,26 @@
/* Global reset & base styles — follow Ant Design 3-layer surface model */
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html,
body {
height: 100%;
font-family:
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
"Helvetica Neue",
Arial,
"Noto Sans",
sans-serif;
font-size: 14px;
line-height: 1.5715;
color: #1f1f1f; /* Ant Design on-surface / colorText */
background-color: #f5f5f5; /* Ant Design bg-layout */
}
+15 -4
View File
@@ -1,11 +1,22 @@
import type { Metadata } from "next";
import { Providers } from "./providers";
import "./globals.css";
export const metadata: Metadata = {
title: "Mod Releaser",
description: "一键向 Modrinth 和 CurseForge 发布 mod 新版本",
};
export default function RootLayout({
children,
}: {
children: React.ReactNode
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>{children}</body>
<html lang="zh-CN">
<body>
<Providers>{children}</Providers>
</body>
</html>
)
);
}
+7 -2
View File
@@ -1,3 +1,8 @@
export default function Page() {
return <h1>Hello, Next.js!</h1>
import { listConfigs } from "@/services/config";
import { MainPage } from "@/components/MainPage";
export default async function Page() {
const configList = await listConfigs();
return <MainPage initialConfigs={configList} />;
}
+21
View File
@@ -0,0 +1,21 @@
"use client";
import { AntdRegistry } from "@ant-design/nextjs-registry";
import { App, ConfigProvider } from "antd";
export function Providers({ children }: { children: React.ReactNode }) {
return (
<AntdRegistry>
<ConfigProvider
theme={{
token: {
colorPrimary: "#1677FF",
borderRadius: 6,
},
}}
>
<App>{children}</App>
</ConfigProvider>
</AntdRegistry>
);
}