fix navbar centering
This commit is contained in:
parent
bcf6c4867d
commit
67a8cff0fd
@ -19,7 +19,7 @@ export function GithubStar(): ReactElement {
|
||||
|
||||
return (
|
||||
<Link
|
||||
className="bg-github-green px-2 py-1 rounded-lg flex items-center gap-1 hover:opacity-85 transform-gpu transition-all"
|
||||
className="bg-github-green px-2 py-1 rounded-lg items-center gap-1 hover:opacity-85 transform-gpu transition-all hidden md:flex"
|
||||
href="https://github.com/RealFascinated/minecraft-helper"
|
||||
target="_blank"
|
||||
>
|
||||
|
@ -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 />
|
||||
|
@ -10,7 +10,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(({ className, type,
|
||||
type={type}
|
||||
className={cn(
|
||||
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
||||
className
|
||||
className,
|
||||
)}
|
||||
ref={ref}
|
||||
{...props}
|
||||
|
Loading…
Reference in New Issue
Block a user