update: component(Header)

mack-mac
mackt 8 months ago
parent 46df608779
commit 9cb52f478c

@ -16,17 +16,19 @@ export default function Footer() {
return ( return (
<footer className="absolute bottom-[40px] flex flex-col items-center w-full justify-center text-center text-[12px] leading-[16.8px]"> <footer className="absolute bottom-[40px] flex flex-col items-center w-full justify-center text-center text-[12px] leading-[16.8px]">
<p className="mt-[18px] mb-[12px] text-[rgba(0,0,0,0.4)]"> <div className="w-[1200px] mx-auto">
ICP2024190175-1 Shenzhen QueYue Culture Technology Co., Ltd. <p className="mt-[18px] mb-[12px] text-[rgba(0,0,0,0.4)]">
</p> ICP2024190175-1 Shenzhen QueYue Culture Technology Co., Ltd.
</p>
<p className="text-[rgba(0,0,0,0.7)]"> <p className="text-[rgba(0,0,0,0.7)]">
{agreementList.map(({ name, url }) => ( {agreementList.map(({ name, url }) => (
<a className="mx-[4px]" href={url} key={name}> <a className="mx-[4px]" href={url} key={name}>
{name} {name}
</a> </a>
))} ))}
</p> </p>
</div>
</footer> </footer>
); );
} }

@ -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>
); );
} }

@ -1,5 +1,3 @@
export default function AppLogo() { export default function AppLogo() {
return ( return <h1 className="w-[104px] h-[40px] pl-[52px] bg-[url(/img/logo.svg)] bg-left bg-no-repeat cursor-pointer" />;
<h1 className="absolute top-[20px] left-[264px] w-[104px] h-[40px] pl-[52px] bg-[url(/img/logo.svg)] bg-left bg-no-repeat cursor-pointer" />
);
} }

Loading…
Cancel
Save