diff --git a/landing/app/enterprise/enterprise-client.tsx b/landing/app/enterprise/enterprise-client.tsx index 8d7da60121..94ab16722d 100644 --- a/landing/app/enterprise/enterprise-client.tsx +++ b/landing/app/enterprise/enterprise-client.tsx @@ -66,7 +66,7 @@ function EnterpriseHero() { {/* CTA */}
View Products diff --git a/landing/app/framework/page.tsx b/landing/app/framework/page.tsx deleted file mode 100644 index f830eca840..0000000000 --- a/landing/app/framework/page.tsx +++ /dev/null @@ -1,49 +0,0 @@ -"use client"; - -import { motion } from "framer-motion"; -import { HalftoneBackground } from "@/components/landing/halftone-bg"; -import { FrameworkContent, FrameworkHero } from "../products/products-client"; - -export default function FrameworkPage() { - return ( -
-
-
-
-
- -
- - - -
- -
-
- - Better Auth Framework - -
- - - -
-
-
-
- ); -} diff --git a/landing/app/infrastructure/page.tsx b/landing/app/infrastructure/page.tsx deleted file mode 100644 index 1f1d3c4257..0000000000 --- a/landing/app/infrastructure/page.tsx +++ /dev/null @@ -1,52 +0,0 @@ -"use client"; - -import { motion } from "framer-motion"; -import { HalftoneBackground } from "@/components/landing/halftone-bg"; -import { - InfrastructureContent, - InfrastructureHero, -} from "../products/products-client"; - -export default function InfrastructurePage() { - return ( -
-
-
-
-
- -
- - - -
- -
-
- - Infrastructure - -
- - - -
-
-
-
- ); -} diff --git a/landing/app/products/products-client.tsx b/landing/app/products/products-client.tsx index 9d26877e00..6ff667fccb 100644 --- a/landing/app/products/products-client.tsx +++ b/landing/app/products/products-client.tsx @@ -260,7 +260,7 @@ function ComparisonCell({ value }: { value: string | boolean }) { ); } -export function FrameworkHero() { +function FrameworkHero() { const highlights = [{ label: "License", value: "MIT" }]; return ( @@ -336,12 +336,13 @@ export function FrameworkHero() { ); } -export function InfrastructureHero() { +function InfrastructureHero() { const principles = [ + { label: "Framework", value: "Open source" }, { label: "Users", value: "Unlimited" }, { label: "Audit logs", value: "From 10k/mo" }, { label: "Security", value: "$0.0001/event overage" }, - { label: "Self-service SSO", value: "Business+" }, + { label: "SSO", value: "Business+" }, ]; const tiers = [ @@ -424,10 +425,10 @@ export function InfrastructureHero() { Get Started - Read Docs + Contact Sales ( @@ -2493,7 +2493,7 @@ export function HeroReadMe({

diff --git a/landing/components/landing/staggered-nav-files.tsx b/landing/components/landing/staggered-nav-files.tsx index 161dc9a2db..b1fb9b8b4f 100644 --- a/landing/components/landing/staggered-nav-files.tsx +++ b/landing/components/landing/staggered-nav-files.tsx @@ -23,7 +23,11 @@ interface NavFileItem { const navFiles: NavFileItem[] = [ { name: "readme", href: "/" }, { name: "docs", href: "/docs" }, - { name: "infrastructure", href: "/infrastructure" }, +]; + +const productFiles: NavFileItem[] = [ + { name: "framework", href: "/products?tab=framework" }, + { name: "infrastructure", href: "/products?tab=infrastructure" }, ]; const resourceFiles: NavFileItem[] = [ @@ -92,12 +96,21 @@ const logoAssets = { export function StaggeredNavFiles() { const pathname = usePathname() || "/"; + const [productsOpen, setProductsOpen] = useState(false); const [resourcesOpen, setResourcesOpen] = useState(false); const [mobileMenuOpen, setMobileMenuOpen] = useState(false); const [mobileView, setMobileView] = useState<"docs" | "nav">("docs"); const [mobileDocSection, setMobileDocSection] = useState(-1); + const productsTimeout = useRef(undefined); const resourcesTimeout = useRef(undefined); + const openProducts = () => { + clearTimeout(productsTimeout.current); + setProductsOpen(true); + }; + const closeProducts = () => { + productsTimeout.current = setTimeout(() => setProductsOpen(false), 150); + }; const openResources = () => { clearTimeout(resourcesTimeout.current); setResourcesOpen(true); @@ -107,8 +120,8 @@ export function StaggeredNavFiles() { }; const isActive = useCallback((href: string) => pathname === href, [pathname]); const isDocs = pathname.startsWith("/docs"); - const isFrameworkPage = pathname === "/framework"; - const isInfrastructurePage = pathname === "/infrastructure"; + const isProductPage = + pathname === "/products" || pathname.startsWith("/products/"); const isResourcePage = resourceFiles.some((r) => { const matchPath = r.path || r.href; return pathname === matchPath || pathname.startsWith(`${matchPath}/`); @@ -116,7 +129,7 @@ export function StaggeredNavFiles() { const isNarrowLeft = isDocs; const leftPaneWidthClass = isNarrowLeft ? "w-[22vw] max-w-[300px]" - : isFrameworkPage || isInfrastructurePage || isResourcePage + : isProductPage || isResourcePage ? "w-[30%]" : "w-[40%]"; const navBottomBorderClass = isNarrowLeft ? "border-foreground/5" : ""; @@ -275,6 +288,80 @@ export function StaggeredNavFiles() { ); })} + {/* Products folder tab */} + +
+ + products + + + + +
+ + + {productsOpen && ( + + {productFiles.map((item, i) => ( + + setProductsOpen(false)} + className="block" + > + + + + ))} + + )} + +
+ {/* Enterprise tab */} ( - - setMobileMenuOpen(false)} - className={`flex items-center gap-2.5 px-5 py-3.5 border-b border-foreground/[0.06] transition-colors ${ - isActive(item.path || item.href) || - (item.href === "/docs" && isDocs) - ? "bg-foreground/[0.04]" - : "hover:bg-foreground/[0.03]" - }`} + {[...navFiles, ...productFiles, ...resourceFiles].map( + (item, i) => ( + - setMobileMenuOpen(false)} + className={`flex items-center gap-2.5 px-5 py-3.5 border-b border-foreground/[0.06] transition-colors ${ isActive(item.path || item.href) || (item.href === "/docs" && isDocs) - ? "text-foreground" - : "text-foreground/75 dark:text-foreground/60" + ? "bg-foreground/[0.04]" + : "hover:bg-foreground/[0.03]" }`} > - {item.name} - - {item.external && ( - - - - )} - - - ))} + {item.name} +
+ {item.external && ( + + + + )} + + + ), + )} diff --git a/landing/next.config.js b/landing/next.config.js index 661c7ac4fe..828844b8df 100644 --- a/landing/next.config.js +++ b/landing/next.config.js @@ -33,11 +33,6 @@ const nextConfig = { destination: "/docs/introduction", permanent: false, }, - { - source: "/products", - destination: "/framework", - permanent: false, - }, ]; }, async rewrites() {