mirror of
https://github.com/timmypidashev/web.git
synced 2026-04-14 02:53:51 +00:00
center header:
This commit is contained in:
@@ -35,30 +35,32 @@ function Header() {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex space-x-1">
|
||||
{tabs.map((tab) => (
|
||||
<Link key={tab.id} href={`/${tab.id}`} passHref>
|
||||
<motion.a
|
||||
onClick={() => setActiveTab(tab.id)}
|
||||
className={`${
|
||||
activeTab === tab.id ? "" : "hover:text-white/60"
|
||||
} relative rounded-full px-3 py-1.5 text-sm font-medium text-white outline-sky-400 transition focus-visible:outline-2`}
|
||||
style={{
|
||||
WebkitTapHighlightColor: "transparent",
|
||||
}}
|
||||
>
|
||||
{activeTab === tab.id && (
|
||||
<motion.span
|
||||
layoutId="bubble"
|
||||
className="absolute inset-0 z-10 bg-white mix-blend-difference"
|
||||
style={{ borderRadius: 9999 }}
|
||||
transition={{ type: "spring", bounce: 0.2, duration: 0.6 }}
|
||||
/>
|
||||
)}
|
||||
{tab.label}
|
||||
</motion.a>
|
||||
</Link>
|
||||
))}
|
||||
<div className="flex justify-center items-center">
|
||||
<div className="flex space-x-1">
|
||||
{tabs.map((tab) => (
|
||||
<Link key={tab.id} href={`/${tab.id}`} passHref>
|
||||
<motion.a
|
||||
onClick={() => setActiveTab(tab.id)}
|
||||
className={`${
|
||||
activeTab === tab.id ? "" : "hover:text-white/60"
|
||||
} relative rounded-full px-3 py-1.5 text-sm font-medium text-white outline-sky-400 transition focus-visible:outline-2`}
|
||||
style={{
|
||||
WebkitTapHighlightColor: "transparent",
|
||||
}}
|
||||
>
|
||||
{activeTab === tab.id && (
|
||||
<motion.span
|
||||
layoutId="bubble"
|
||||
className="absolute inset-0 z-10 bg-white mix-blend-difference"
|
||||
style={{ borderRadius: 9999 }}
|
||||
transition={{ type: "spring", bounce: 0.2, duration: 0.6 }}
|
||||
/>
|
||||
)}
|
||||
{tab.label}
|
||||
</motion.a>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user