init
This commit is contained in:
@ -1,22 +1,57 @@
|
||||
import type { Metadata } from 'next'
|
||||
import { Inter } from 'next/font/google'
|
||||
import './globals.css'
|
||||
import type { Metadata } from "next";
|
||||
import { Inter } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import Link from "next/link";
|
||||
import footer from "@/app/assets/footer.jpg";
|
||||
import Image from "next/image";
|
||||
import banner from "@/app/assets/banner.jpg";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
const inter = Inter({ subsets: ['latin'] })
|
||||
const inter = Inter({ subsets: ["latin"] });
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Create Next App',
|
||||
description: 'Generated by create next app',
|
||||
}
|
||||
title: "中国科学院重庆绿色智能技术研究院合肥分院",
|
||||
description: "Generated by create next app",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
const navLinks = [
|
||||
{ title: "首页", href: "/" },
|
||||
{ title: "机构设置", href: "#" },
|
||||
{ title: "人才队伍", href: "#" },
|
||||
{ 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}>{children}</body>
|
||||
<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>
|
||||
{children}
|
||||
<Image src={footer} alt={"footer"} className={"mt-4"} />
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user