2026-04-02 09:23:57 +08:00
|
|
|
import { Outlet, Link } from "react-router-dom"
|
|
|
|
|
import { useMemo } from "react"
|
|
|
|
|
import dayjs from "dayjs"
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Main application component that serves as the root layout.
|
|
|
|
|
* Uses React Router's Outlet to render child routes.
|
|
|
|
|
*/
|
|
|
|
|
export default function HeroLayout() {
|
|
|
|
|
const today = useMemo(() => dayjs(), [])
|
|
|
|
|
|
|
|
|
|
return (
|
2026-04-02 10:01:18 +08:00
|
|
|
<div className="bg-gray-50">
|
2026-04-02 09:23:57 +08:00
|
|
|
{/* Navigation Header */}
|
|
|
|
|
<header className="bg-white shadow-sm border-b">
|
2026-04-02 10:01:18 +08:00
|
|
|
<div className="max-w-screen-2xl mx-auto px-4 sm:px-6 lg:px-10">
|
2026-04-02 09:23:57 +08:00
|
|
|
<div className="flex justify-between items-center h-16">
|
|
|
|
|
<div className="flex items-center">
|
|
|
|
|
<h1 className="text-xl font-semibold text-gray-900">
|
2026-04-02 10:01:18 +08:00
|
|
|
三角洲行动改枪码库
|
2026-04-02 09:23:57 +08:00
|
|
|
</h1>
|
|
|
|
|
</div>
|
|
|
|
|
<nav className="flex space-x-8">
|
2026-04-06 17:57:25 +08:00
|
|
|
<Link
|
|
|
|
|
to="/firearms"
|
|
|
|
|
className="text-gray-500 hover:text-gray-900 px-3 py-2 rounded-md text-sm font-medium"
|
|
|
|
|
>
|
|
|
|
|
武器列表
|
|
|
|
|
</Link>
|
2026-04-02 09:23:57 +08:00
|
|
|
<Link
|
2026-04-02 10:01:18 +08:00
|
|
|
to="/mod-codes"
|
2026-04-02 09:23:57 +08:00
|
|
|
className="text-gray-500 hover:text-gray-900 px-3 py-2 rounded-md text-sm font-medium"
|
|
|
|
|
>
|
2026-04-02 10:01:18 +08:00
|
|
|
改枪码
|
2026-04-02 09:23:57 +08:00
|
|
|
</Link>
|
2026-04-02 10:01:18 +08:00
|
|
|
<a
|
|
|
|
|
href="https://github.com/zihluwang/delta-force-firearm-modification-codes"
|
|
|
|
|
target="_blank"
|
|
|
|
|
rel="noopener noreferrer"
|
2026-04-02 09:23:57 +08:00
|
|
|
className="text-gray-500 hover:text-gray-900 px-3 py-2 rounded-md text-sm font-medium"
|
|
|
|
|
>
|
2026-04-02 10:01:18 +08:00
|
|
|
GitHub
|
|
|
|
|
</a>
|
2026-04-02 09:23:57 +08:00
|
|
|
</nav>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
{/* Main Content Area */}
|
2026-04-02 10:01:18 +08:00
|
|
|
<main className="max-w-screen-2xl mx-auto py-6 sm:px-6 lg:px-10">
|
2026-04-02 09:23:57 +08:00
|
|
|
<div className="px-4 py-6 sm:px-0">
|
|
|
|
|
<Outlet />
|
|
|
|
|
</div>
|
|
|
|
|
</main>
|
|
|
|
|
|
|
|
|
|
{/* Footer */}
|
2026-04-02 10:01:18 +08:00
|
|
|
<footer className="bg-white border-t">
|
|
|
|
|
<div className="max-w-screen-2xl mx-auto py-4 px-4 sm:px-6 lg:px-10">
|
2026-04-02 09:23:57 +08:00
|
|
|
<p className="text-center text-sm text-gray-500">
|
2026-04-02 10:01:18 +08:00
|
|
|
© 2024-{today.year()} Zihlu Wang 和 OnixByte。使用 React 与 TypeScript 构建。
|
2026-04-02 09:23:57 +08:00
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</footer>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|