fix navbar centering
This commit is contained in:
@ -37,28 +37,33 @@ export default function NavBar(): ReactElement {
|
||||
const path = usePathname();
|
||||
|
||||
return (
|
||||
<div className="bg-secondary w-full rounded-lg flex justify-between items-center gap-3 mt-2 px-3 bg-opacity-85 h-12">
|
||||
<div className="bg-secondary relative w-full rounded-lg flex justify-between items-center gap-3 mt-2 px-3 bg-opacity-85 h-12">
|
||||
{/* Left */}
|
||||
<Link href="/" className="flex items-center gap-2">
|
||||
<Logo />
|
||||
<p className="hidden md:block">Minecraft Utilities</p>
|
||||
</Link>
|
||||
|
||||
<div className="flex gap-4">
|
||||
{pages.map((page, index) => {
|
||||
const isActive = path.includes(page.url);
|
||||
{/* Links */}
|
||||
<div className="absolute inset-x-0 flex justify-center">
|
||||
<div className="flex gap-4">
|
||||
{pages.map((page, index) => {
|
||||
const isActive = path.includes(page.url);
|
||||
|
||||
return (
|
||||
<HrefButton
|
||||
className={isActive ? "text-primary" : ""}
|
||||
key={index}
|
||||
title={page.name}
|
||||
url={page.url}
|
||||
openInNewTab={page.openInNewTab}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
return (
|
||||
<HrefButton
|
||||
className={isActive ? "text-primary" : ""}
|
||||
key={index}
|
||||
title={page.name}
|
||||
url={page.url}
|
||||
openInNewTab={page.openInNewTab}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Right */}
|
||||
<div className="flex gap-4 items-center">
|
||||
<ToggleThemeButton />
|
||||
<GithubStar />
|
||||
|
Reference in New Issue
Block a user