diff --git a/public/banner.jpg b/public/banner.jpg new file mode 100644 index 0000000..f1ed46e Binary files /dev/null and b/public/banner.jpg differ diff --git a/src/App.tsx b/src/App.tsx index 87e24fa..bbcf223 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -2,8 +2,15 @@ import Banner from "./components/Banner"; import AboutSection from "./components/sections/AboutSection"; import ProjectsSection from "./components/sections/ProjectsSection"; import ContactSection from "./components/sections/ContactSection"; +import MorePage from "./pages/MorePage"; export default function App() { + const { pathname } = window.location; + + if (pathname === "/more" || pathname === "/more/") { + return ; + } + return (
diff --git a/src/data/navigation.ts b/src/data/navigation.ts index b1d7e41..b37e0ab 100644 --- a/src/data/navigation.ts +++ b/src/data/navigation.ts @@ -31,7 +31,7 @@ export const NAV_ITEMS: NavItem[] = [ { name: "More", desc: "更多工具与服务", - path: "https://xiaozhou233.cn/more", + path: "/more", Icon: ListCollapse, color: "text-cyan-400", borderHover: diff --git a/src/pages/MorePage.tsx b/src/pages/MorePage.tsx new file mode 100644 index 0000000..4b3a752 --- /dev/null +++ b/src/pages/MorePage.tsx @@ -0,0 +1,65 @@ +import { useEffect } from "react"; +import "./more.css"; + +const appIcons = { + water: , + atom: ( + <> + + + + + ), +}; + +const apps = [ + { name: "水质监测面板", desc: "实时掌握水质状况", color: "#06b6d4", link: "/water-admin", icon: appIcons.water }, + { name: "力的课题", desc: "认识三种基本的力", color: "#ef4444", link: "/forces.html", icon: appIcons.atom }, +]; + +export default function MorePage() { + useEffect(() => { + document.title = "更多应用"; + }, []); + + return ( +
+
+
+

更多应用

+

一个入口,汇聚所有工具

+ + 返回主站 + +
+ +
+ {apps.map((app) => ( + + + + +
+

{app.name}

+

{app.desc}

+
+
+ ))} +
+
+
+ ); +} diff --git a/src/pages/more.css b/src/pages/more.css new file mode 100644 index 0000000..f54ab0a --- /dev/null +++ b/src/pages/more.css @@ -0,0 +1,167 @@ +.more-page { + position: relative; + min-height: 100svh; + box-sizing: border-box; + color: #94a3b8; + font-family: system-ui, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif; +} + +.more-page::before { + content: ""; + position: fixed; + inset: 0; + z-index: -1; + background: linear-gradient(rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.6)), + url("/banner.jpg") center / cover no-repeat, #0f172a; +} + +.more-page *, +.more-page *::before, +.more-page *::after { + box-sizing: inherit; +} + +.more-page-inner { + max-width: 1120px; + margin: 0 auto; + padding: 0 24px 64px; +} + +.more-banner { + position: relative; + text-align: center; + padding: 88px 24px; + margin: 32px 0 48px; + border-radius: 20px; + background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); + border: 1px solid rgba(255, 255, 255, 0.06); +} + +.more-home-link { + display: inline-flex; + align-items: center; + gap: 8px; + margin-top: 24px; + padding: 8px 16px; + border-radius: 999px; + background: rgba(255, 255, 255, 0.08); + border: 1px solid rgba(255, 255, 255, 0.14); + color: #e2e8f0; + font-size: 14px; + font-weight: 500; + text-decoration: none; + transition: + background 0.2s ease, + border-color 0.2s ease; +} + +.more-home-link:hover { + background: rgba(255, 255, 255, 0.16); + border-color: rgba(255, 255, 255, 0.25); +} + +.more-banner-title { + font-size: 48px; + font-weight: 700; + letter-spacing: -1px; + margin: 0 0 12px; + color: #f1f5f9; +} + +.more-banner-subtitle { + font-size: 18px; + margin: 0; + color: #94a3b8; +} + +.more-app-grid { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 20px; +} + +.more-app-card { + display: flex; + align-items: center; + gap: 16px; + padding: 20px; + border-radius: 16px; + background: #1e293b; + border: 1px solid rgba(255, 255, 255, 0.06); + text-decoration: none; + transition: + transform 0.25s ease, + box-shadow 0.25s ease, + border-color 0.25s ease; +} + +.more-app-card:hover { + transform: translateY(-4px); + border-color: rgba(255, 255, 255, 0.14); + box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4); +} + +.more-app-icon { + flex-shrink: 0; + display: inline-flex; + align-items: center; + justify-content: center; + width: 48px; + height: 48px; + border-radius: 14px; + color: #fff; +} + +.more-app-icon svg { + width: 22px; + height: 22px; +} + +.more-app-info { + min-width: 0; +} + +.more-app-name { + font-size: 17px; + font-weight: 600; + margin: 0 0 4px; + color: #f1f5f9; +} + +.more-app-desc { + font-size: 13px; + margin: 0; + color: #94a3b8; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +@media (max-width: 1024px) { + .more-banner { + padding: 64px 20px; + } + + .more-app-grid { + grid-template-columns: repeat(2, 1fr); + } +} + +@media (max-width: 600px) { + .more-banner { + padding: 48px 16px; + margin-top: 16px; + } + + .more-banner-title { + font-size: 32px; + } + + .more-app-grid { + grid-template-columns: 1fr; + } + + .more-app-desc { + white-space: normal; + } +}