diff --git a/src/app/(landing-page)/page.tsx b/src/app/(landing-page)/page.tsx index 6590d01..f1e9681 100644 --- a/src/app/(landing-page)/page.tsx +++ b/src/app/(landing-page)/page.tsx @@ -17,7 +17,6 @@ import { extraFeatures, getMetricsItems, mainFeatures, - navbarActionClassName, navLinks, pwaHighlights, stackItems, @@ -27,6 +26,7 @@ import { landingImages } from "@/features/landing/images"; import { fetchGitHubStats } from "@/features/landing/queries"; import { AnimatedThemeToggler } from "@/shared/components/animated-theme-toggler"; import { Logo } from "@/shared/components/logo"; +import { NavbarShell } from "@/shared/components/navigation/navbar/navbar-shell"; import { Badge } from "@/shared/components/ui/badge"; import { Button } from "@/shared/components/ui/button"; import { Card, CardContent } from "@/shared/components/ui/card"; @@ -50,65 +50,60 @@ export default async function Page() { return (
{/* Navigation */} -
-
- + + {/* Center Navigation Links */} + - {/* Center Navigation Links */} - - -
-
+ + + +
+ ))} + + + {/* Hero Section */}
diff --git a/src/features/landing/components/mobile-nav.tsx b/src/features/landing/components/mobile-nav.tsx index e98caa0..124a3df 100644 --- a/src/features/landing/components/mobile-nav.tsx +++ b/src/features/landing/components/mobile-nav.tsx @@ -24,24 +24,18 @@ const navLinks = [ interface MobileNavProps { isPublicDomain: boolean; isLoggedIn: boolean; - triggerClassName?: string; } -export function MobileNav({ - isPublicDomain, - isLoggedIn, - triggerClassName, -}: MobileNavProps) { +export function MobileNav({ isPublicDomain, isLoggedIn }: MobileNavProps) { const [open, setOpen] = useState(false); return (
diff --git a/src/features/landing/constants.ts b/src/features/landing/constants.ts index faee0e7..3faba77 100644 --- a/src/features/landing/constants.ts +++ b/src/features/landing/constants.ts @@ -35,9 +35,6 @@ export type FeatureItem = { colorVar: string; }; -export const navbarActionClassName = - "border-black/10 bg-transparent text-black/75 shadow-none hover:border-black/20 hover:bg-black/10 hover:text-black focus-visible:ring-black/20 data-[state=open]:bg-black/10 data-[state=open]:text-black"; - export const navLinks = [ { href: "#telas", label: "conheça as telas" }, { href: "#funcionalidades", label: "funcionalidades" }, diff --git a/src/shared/components/animated-theme-toggler.tsx b/src/shared/components/animated-theme-toggler.tsx index 33eb319..60c813f 100644 --- a/src/shared/components/animated-theme-toggler.tsx +++ b/src/shared/components/animated-theme-toggler.tsx @@ -1,5 +1,6 @@ "use client"; import { RiMoonClearLine, RiSunLine } from "@remixicon/react"; +import type { VariantProps } from "class-variance-authority"; import { useEffect, useRef, useState } from "react"; import { flushSync } from "react-dom"; import { buttonVariants } from "@/shared/components/ui/button"; @@ -13,11 +14,13 @@ import { cn } from "@/shared/utils/ui"; interface AnimatedThemeTogglerProps extends React.ComponentPropsWithoutRef<"button"> { duration?: number; + variant?: VariantProps["variant"]; } export const AnimatedThemeToggler = ({ className, duration = 400, + variant = "ghost", ...props }: AnimatedThemeTogglerProps) => { const [isDark, setIsDark] = useState(false); @@ -84,10 +87,10 @@ export const AnimatedThemeToggler = ({ onClick={toggleTheme} data-state={isDark ? "dark" : "light"} className={cn( - buttonVariants({ variant: "ghost", size: "icon-sm" }), - "group relative text-muted-foreground transition-all duration-200", - "hover:text-foreground focus-visible:ring-2 focus-visible:ring-primary/40", - "data-[state=open]:bg-accent/60 data-[state=open]:text-foreground", + buttonVariants({ variant, size: "icon-sm" }), + "group relative transition-all duration-200", + variant === "ghost" && + "text-muted-foreground hover:text-foreground focus-visible:ring-2 focus-visible:ring-primary/40 data-[state=open]:bg-accent/60 data-[state=open]:text-foreground", className, )} {...props} diff --git a/src/shared/components/navigation/navbar/app-navbar.tsx b/src/shared/components/navigation/navbar/app-navbar.tsx index fb4acf4..476c2aa 100644 --- a/src/shared/components/navigation/navbar/app-navbar.tsx +++ b/src/shared/components/navigation/navbar/app-navbar.tsx @@ -1,10 +1,9 @@ -import Link from "next/link"; import { AnimatedThemeToggler } from "@/shared/components/animated-theme-toggler"; -import { Logo } from "@/shared/components/logo"; import { NotificationBell } from "@/shared/components/navigation/navbar/notification-bell"; import { RefreshPageButton } from "@/shared/components/refresh-page-button"; import type { DashboardNotificationsSnapshot } from "@/shared/lib/types/notifications"; import { NavMenu } from "./nav-menu"; +import { NavbarShell } from "./navbar-shell"; import { NavbarUser } from "./navbar-user"; type AppNavbarProps = { @@ -19,9 +18,6 @@ type AppNavbarProps = { notificationsSnapshot: DashboardNotificationsSnapshot; }; -const navbarActionClassName = - "border-black/10 bg-transparent text-black/75 shadow-none hover:border-black/20 hover:bg-black/10 hover:text-black focus-visible:ring-black/20 data-[state=open]:bg-black/10 data-[state=open]:text-black"; - export function AppNavbar({ user, pagadorAvatarUrl, @@ -29,28 +25,20 @@ export function AppNavbar({ notificationsSnapshot, }: AppNavbarProps) { return ( -
-
- - - - - - -
- - - -
- - + + +
+ + +
-
+ + ); } diff --git a/src/shared/components/navigation/navbar/nav-menu.tsx b/src/shared/components/navigation/navbar/nav-menu.tsx index 0ccb4df..4116a6c 100644 --- a/src/shared/components/navigation/navbar/nav-menu.tsx +++ b/src/shared/components/navigation/navbar/nav-menu.tsx @@ -20,13 +20,18 @@ import { SheetTitle, SheetTrigger, } from "@/shared/components/ui/sheet"; +import { cn } from "@/shared/utils/ui"; import { MobileLink, MobileSectionLabel } from "./mobile-link"; import { NavDropdown } from "./nav-dropdown"; import { NAV_SECTIONS } from "./nav-items"; import { NavPill } from "./nav-pill"; -import { triggerActiveClass, triggerClass } from "./nav-styles"; import { MobileTools, NavToolsDropdown } from "./nav-tools"; +const triggerClass = + "h-8! rounded-md! px-2! py-0! text-sm! font-medium! bg-transparent! shadow-none! lowercase! [&_svg]:text-current! text-black/75! hover:text-black! hover:bg-black/10! focus:text-black! focus:bg-black/10! focus-visible:ring-black/20! data-[state=open]:text-black! data-[state=open]:bg-black/10!"; + +const triggerActiveClass = "bg-black/15! text-black!"; + export function NavMenu() { const pathname = usePathname(); const [sheetOpen, setSheetOpen] = useState(false); @@ -55,7 +60,10 @@ export function NavMenu() { return ( {section.label} @@ -82,9 +90,9 @@ export function NavMenu() {