feat: 更新项目依赖并重构样式管理

- 添加 React Router 和 Tailwind CSS 依赖
- 移除旧的 CSS 文件,改用模块化样式
- 更新 lint-staged 配置以跳过 CSS 文件
- 重构 App 组件以使用新的导航和样式
This commit is contained in:
zhongyidian committed 2026-01-23 16:02:49 +08:00
1 parent e348e16170
commit 8b32e84206
36 files changed
+698 -144

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
@reference "tailwindcss";
.container {
@apply text-center;
}
.title {
@apply text-4xl font-bold mb-4;
}
.description {
@apply text-lg mb-4;
}
.actions {
@apply flex gap-4 justify-center;
}
+17
View File
@@ -0,0 +1,17 @@
import { Link } from "react-router-dom";
import { Button } from "../../components/common";
import styles from "./About.module.css";
export function About() {
return (
<div className={styles.container}>
<h1 className={styles.title}>关于我们</h1>
<p className={styles.description}>这是关于页面</p>
<div className={styles.actions}>
<Link to="/">
<Button variant="secondary">返回首页</Button>
</Link>
</div>
</div>
);
}
+1
View File
@@ -0,0 +1 @@
export { About } from "./About.tsx";
+22
View File
@@ -0,0 +1,22 @@
.container {
text-align: center;
}
.title {
margin-bottom: 1rem;
font-size: 2.25rem;
line-height: 2.5rem;
font-weight: 700;
}
.description {
margin-bottom: 1rem;
font-size: 1.125rem;
line-height: 1.75rem;
}
.actions {
display: flex;
gap: 1rem;
justify-content: center;
}
+17
View File
@@ -0,0 +1,17 @@
import { Link } from "react-router-dom";
import { Button } from "../../components/common";
import styles from "./Home.module.css";
export function Home() {
return (
<div className={styles.container}>
<h1 className={styles.title}>首页</h1>
<p className={styles.description}>欢迎来到首页</p>
<div className={styles.actions}>
<Link to="/about">
<Button>关于我们</Button>
</Link>
</div>
</div>
);
}
+1
View File
@@ -0,0 +1 @@
export { Home } from "./Home.tsx";
+2
View File
@@ -0,0 +1,2 @@
export { About } from "./About";
export { Home } from "./Home";