update
This commit is contained in:
@ -6,6 +6,7 @@ import footer from "@/app/assets/footer.jpg";
|
||||
import Image from "next/image";
|
||||
import banner from "@/app/assets/banner.jpg";
|
||||
import { ReactNode } from "react";
|
||||
import MainNav from "@/app/components/MainNav";
|
||||
|
||||
const inter = Inter({ subsets: ["latin"] });
|
||||
|
||||
@ -14,40 +15,13 @@ export const metadata: Metadata = {
|
||||
description: "Generated by create next app",
|
||||
};
|
||||
|
||||
const navLinks = [
|
||||
{ title: "首页", href: "/" },
|
||||
{ title: "机构设置", href: "#" },
|
||||
{ title: "人才队伍", href: "/talents/overview" },
|
||||
{ title: "科研进展", href: "#" },
|
||||
{ title: "科技成果", href: "#" },
|
||||
{ title: "学术交流", href: "#" },
|
||||
{ title: "成果转化服务", href: "#" },
|
||||
{ title: "中科院科技资源共享平台", href: "#" },
|
||||
{ title: "联系我们", href: "#" },
|
||||
];
|
||||
|
||||
export default function RootLayout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body className={inter.className}>
|
||||
<main className={"w-[1000px] m-auto"}>
|
||||
<Image className={"w-full"} src={banner} alt={"banner"} />
|
||||
<nav className={"main-nav bg-[#1958a7] h-[38px]"}>
|
||||
<ul className={"w-full h-full flex"}>
|
||||
{navLinks.map((link, index) => (
|
||||
<li key={link.title + index}>
|
||||
<Link
|
||||
href={link.href}
|
||||
className={
|
||||
"text-white text-sm h-[38px] flex justify-center items-center min-w-[60px] mx-2.5"
|
||||
}
|
||||
>
|
||||
{link.title}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</nav>
|
||||
<MainNav />
|
||||
{children}
|
||||
<Image src={footer} alt={"footer"} className={"mt-4"} />
|
||||
</main>
|
||||
|
Reference in New Issue
Block a user