fix navbar centering
This commit is contained in:
parent
bcf6c4867d
commit
67a8cff0fd
@ -19,7 +19,7 @@ export function GithubStar(): ReactElement {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Link
|
<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"
|
href="https://github.com/RealFascinated/minecraft-helper"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
|
@ -37,28 +37,33 @@ export default function NavBar(): ReactElement {
|
|||||||
const path = usePathname();
|
const path = usePathname();
|
||||||
|
|
||||||
return (
|
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">
|
<Link href="/" className="flex items-center gap-2">
|
||||||
<Logo />
|
<Logo />
|
||||||
<p className="hidden md:block">Minecraft Utilities</p>
|
<p className="hidden md:block">Minecraft Utilities</p>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<div className="flex gap-4">
|
{/* Links */}
|
||||||
{pages.map((page, index) => {
|
<div className="absolute inset-x-0 flex justify-center">
|
||||||
const isActive = path.includes(page.url);
|
<div className="flex gap-4">
|
||||||
|
{pages.map((page, index) => {
|
||||||
|
const isActive = path.includes(page.url);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<HrefButton
|
<HrefButton
|
||||||
className={isActive ? "text-primary" : ""}
|
className={isActive ? "text-primary" : ""}
|
||||||
key={index}
|
key={index}
|
||||||
title={page.name}
|
title={page.name}
|
||||||
url={page.url}
|
url={page.url}
|
||||||
openInNewTab={page.openInNewTab}
|
openInNewTab={page.openInNewTab}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Right */}
|
||||||
<div className="flex gap-4 items-center">
|
<div className="flex gap-4 items-center">
|
||||||
<ToggleThemeButton />
|
<ToggleThemeButton />
|
||||||
<GithubStar />
|
<GithubStar />
|
||||||
|
@ -10,7 +10,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(({ className, type,
|
|||||||
type={type}
|
type={type}
|
||||||
className={cn(
|
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",
|
"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}
|
ref={ref}
|
||||||
{...props}
|
{...props}
|
||||||
|
Loading…
Reference in New Issue
Block a user