Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/Auth/SignInButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function SignInButton({ className }: { className?: string }) {
type="button"
onClick={signInWithGoogle}
className={cn(
"group relative flex items-center gap-2 px-4 py-2 rounded-full text-sm font-bold uppercase tracking-wider overflow-hidden",
"group relative inline-flex min-w-[7.5rem] items-center justify-center gap-1.5 whitespace-nowrap px-3.5 py-1.75 rounded-full text-sm font-bold uppercase tracking-wider overflow-hidden",
"text-zinc-300 hover:text-white transition-all duration-300",
className
)}
Expand Down
27 changes: 21 additions & 6 deletions src/components/Common/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ const linkKeys = [
{ key: "jobs", href: "/jobs" },
] as const;

const desktopNavWidthByKey: Record<(typeof linkKeys)[number]["key"], string> = {
home: "w-[7rem]",
profiles: "w-[6rem]",
editor: "w-[5.5rem]",
howTo: "w-[5.25rem]",
blog: "w-[4.5rem]",
jobs: "w-[5rem]",
};

const sparkleDriftX = [-10, 8, 14] as const;

/* ── Prismatic shimmer line along the navbar bottom ── */
const PrismBorder = () => (
<div className="absolute bottom-0 left-0 right-0 h-[1px] overflow-hidden">
Expand All @@ -39,7 +50,7 @@ const PrismBorder = () => (
);

/* ── Floating sparkle particles near active indicator ── */
const Sparkle = ({ delay }: { delay: number }) => (
const Sparkle = ({ delay, driftX }: { delay: number; driftX: number }) => (
<motion.div
className="absolute rounded-full"
style={{
Expand All @@ -52,7 +63,7 @@ const Sparkle = ({ delay }: { delay: number }) => (
animate={{
opacity: [0, 1, 0],
y: [0, -18, -28],
x: [0, (Math.random() - 0.5) * 20],
x: [0, driftX],
scale: [0, 1.2, 0],
}}
transition={{
Expand Down Expand Up @@ -92,7 +103,7 @@ const ActiveIndicator = () => (
{/* Sparkle particles */}
<div className="absolute top-0">
{[0, 0.6, 1.2].map((d, i) => (
<Sparkle key={i} delay={d} />
<Sparkle key={i} delay={d} driftX={sparkleDriftX[i]} />
))}
</div>
</motion.div>
Expand All @@ -104,12 +115,14 @@ const NavLink = ({
label,
isActive,
index,
widthClass,
mmFont = "",
}: {
href: string;
label: string;
isActive: boolean;
index: number;
widthClass: string;
mmFont?: string;
}) => {
const ref = useRef<HTMLDivElement>(null);
Expand Down Expand Up @@ -162,10 +175,11 @@ const NavLink = ({
<MseLink
href={href}
className={cn(
"relative font-display text-[13px] font-bold uppercase tracking-[0.15em] py-2 px-1 transition-colors duration-300",
"relative inline-flex items-center justify-center whitespace-nowrap font-display text-[14px] font-bold uppercase tracking-[0.12em] py-2 px-1 transition-colors duration-300",
isActive
? "text-white"
: "text-zinc-500 hover:text-zinc-200",
widthClass,
mmFont
)}
>
Expand Down Expand Up @@ -350,21 +364,22 @@ const Navbar = () => {
{/* Desktop Navigation */}
<div className="hidden lg:flex flex-row items-center">
{/* Primary nav links */}
<div className="flex items-center gap-5 xl:gap-8">
<div className="flex items-center gap-2 xl:gap-2.5">
{linkKeys.map((link, i) => (
<NavLink
key={link.key}
href={link.href}
label={t(link.key)}
isActive={path === link.href}
index={i}
widthClass={desktopNavWidthByKey[link.key]}
mmFont={mmFont}
/>
))}
</div>

{/* Prismatic divider */}
<div className="mx-4 xl:mx-5 h-4 w-px bg-gradient-to-b from-transparent via-white/[0.08] to-transparent" />
<div className="mx-2 xl:mx-2.5 h-4 w-px bg-gradient-to-b from-transparent via-white/[0.08] to-transparent" />

{/* Utility group */}
<div className="flex items-center gap-3">
Expand Down
Loading