|
|
@ -1,6 +1,13 @@
|
|
|
|
|
|
|
|
'use client';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import Link from 'next/link';
|
|
|
|
|
|
|
|
import { usePathname } from 'next/navigation';
|
|
|
|
|
|
|
|
|
|
|
|
import Logo from '@/components/Logo';
|
|
|
|
import Logo from '@/components/Logo';
|
|
|
|
|
|
|
|
|
|
|
|
export default function Header() {
|
|
|
|
export default function Header() {
|
|
|
|
|
|
|
|
const pathName = usePathname();
|
|
|
|
|
|
|
|
|
|
|
|
const menuList = [
|
|
|
|
const menuList = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: '首页',
|
|
|
|
name: '首页',
|
|
|
@ -17,23 +24,25 @@ export default function Header() {
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<header className="absolute top-0 w-full h-[80px] flex items-center">
|
|
|
|
<header className="absolute top-0 w-full h-[80px]">
|
|
|
|
<Logo />
|
|
|
|
<div className="w-[1200px] h-full mx-auto flex items-center justify-between">
|
|
|
|
|
|
|
|
<Logo />
|
|
|
|
|
|
|
|
|
|
|
|
<ul className="absolute right-[377px] flex flex-row items-center">
|
|
|
|
<div className="h-full flex flex-row items-center">
|
|
|
|
{menuList.map(({ name, path }) => (
|
|
|
|
<ul className="mr-[40px] flex flex-row items-center space-x-[40px]">
|
|
|
|
<li
|
|
|
|
{menuList.map(({ name, path }) => (
|
|
|
|
key={path}
|
|
|
|
<li
|
|
|
|
className="px-[25px] text-[18px] leading-[25.2px] text-[rgba(0,0,0,0.4)] hover:text-[rgba(0,0,0,0.95)]"
|
|
|
|
key={path}
|
|
|
|
>
|
|
|
|
className={`text-[18px] leading-[25.2px] hover:text-[rgba(0,0,0,0.95)] ${pathName === path ? 'text-[rgba(0,0,0,0.95)]' : 'text-[rgba(0,0,0,0.4)]'}`}
|
|
|
|
<a href={path}>{name}</a>
|
|
|
|
>
|
|
|
|
</li>
|
|
|
|
<Link href={path}>{name}</Link>
|
|
|
|
))}
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
))}
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
<button className="absolute right-[263px] w-[74px] h-[36px] border-[#000] border-[1.5px] rounded-[60px] text-[17px]">
|
|
|
|
<button className="w-[74px] h-[36px] border-[#000] border-[1.5px] rounded-[60px] text-[17px]">登录</button>
|
|
|
|
登录
|
|
|
|
</div>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
</header>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|