diff --git a/apps/www/src/app/(marketing)/page.tsx b/apps/www/src/app/(marketing)/page.tsx index df7b94d..2fb8fff 100644 --- a/apps/www/src/app/(marketing)/page.tsx +++ b/apps/www/src/app/(marketing)/page.tsx @@ -1,4 +1,4 @@ -import { MarketingLayout } from "@/components/marketing-layout"; +import { MarketingLayout } from "@/components/layout/marketing-layout"; export default function HomePage() { return ( @@ -7,3 +7,6 @@ export default function HomePage() { ); } + +export const dynamic = "force-static"; +export const revalidate = 60 * 60; diff --git a/apps/www/src/app/saas-starterkit/page.tsx b/apps/www/src/app/saas-starterkit/page.tsx new file mode 100644 index 0000000..3e1b101 --- /dev/null +++ b/apps/www/src/app/saas-starterkit/page.tsx @@ -0,0 +1,9 @@ +import { MarketingLayout } from "@/components/layout/marketing-layout"; + +export default function SaasStarterKitPage() { + return ( + +
saas starter kit
+
+ ); +} diff --git a/apps/www/src/components/icons.tsx b/apps/www/src/components/icons.tsx index b5faa47..7b3e585 100644 --- a/apps/www/src/components/icons.tsx +++ b/apps/www/src/components/icons.tsx @@ -2,7 +2,7 @@ import { siteConfig } from "@/config/site"; import { cn } from "@/lib/utils"; import type { ElementType } from "react"; -export type IconProps = React.HTMLAttributes; +export type IconProps = React.SVGProps; export const Icons = { logo: ({ @@ -23,12 +23,7 @@ export const Icons = { className={cn("h-6 w-6 fill-primary", iconProps?.className)} {...iconProps} /> - + {siteConfig.name} @@ -84,7 +79,7 @@ export const Icons = { > ), - spinner: (props: React.SVGProps) => ( + spinner: (props: IconProps) => ( ), + star: (props: IconProps) => ( + + + + ), + chevronRight: (props: IconProps) => ( + + + + ), + circle: (props: IconProps) => ( + + + + ), }; diff --git a/apps/www/src/components/layout/marketing-header.tsx b/apps/www/src/components/layout/marketing-header.tsx index d184511..0ccc6d9 100644 --- a/apps/www/src/components/layout/marketing-header.tsx +++ b/apps/www/src/components/layout/marketing-header.tsx @@ -1,32 +1,43 @@ import { Icons } from "@/components/icons"; +import { MarketingMainNav } from "@/components/layout/marketing-nav"; import { buttonVariants } from "@/components/ui/button"; import { siteUrls } from "@/config/urls"; +import { getGithubRepoStars } from "@/server/actions/github"; import Link from "next/link"; -export function MarketingHeader() { +export async function MarketingHeader() { + const stars = await getGithubRepoStars(); + return (
- - - - -
- - Get Started +
+ + + +
+ +
+ + + {stars} + + + - Pricing + Get Started
diff --git a/apps/www/src/components/marketing-layout.tsx b/apps/www/src/components/layout/marketing-layout.tsx similarity index 100% rename from apps/www/src/components/marketing-layout.tsx rename to apps/www/src/components/layout/marketing-layout.tsx diff --git a/apps/www/src/components/layout/marketing-mobile-nav.tsx b/apps/www/src/components/layout/marketing-mobile-nav.tsx deleted file mode 100644 index 20432c3..0000000 --- a/apps/www/src/components/layout/marketing-mobile-nav.tsx +++ /dev/null @@ -1,99 +0,0 @@ -"use client"; - -import { Icons } from "@/components/icons"; -import { Button } from "@/components/ui/button"; -import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet"; -import { navConfig } from "@/config/nav"; -import { siteUrls } from "@/config/urls"; -import { cn } from "@/lib/utils"; -import type { LinkProps } from "next/link"; -import Link from "next/link"; -import { useRouter } from "next/navigation"; -import React from "react"; - -export function MarketingMobileNav() { - const [isOpen, setIsOpen] = React.useState(false); - - return ( - setIsOpen(o)}> - - - - -
- - - -
- -
- {navConfig.items.map((item) => ( - - {item.label} - - ))} -
-
-
- ); -} - -interface MobileLinkProps extends LinkProps { - onOpenChange?: (open: boolean) => void; - children: React.ReactNode; - className?: string; - disabled?: boolean; -} - -function MobileLink({ - href, - onOpenChange, - className, - children, - disabled, - ...props -}: MobileLinkProps) { - const router = useRouter(); - return ( - { - void router.push(String(href)); - onOpenChange?.(false); - }} - className={cn( - disabled && "pointer-events-none opacity-60", - className, - )} - {...props} - > - {children} - - ); -} diff --git a/apps/www/src/components/layout/marketing-nav.tsx b/apps/www/src/components/layout/marketing-nav.tsx index aacdfbb..3caaf39 100644 --- a/apps/www/src/components/layout/marketing-nav.tsx +++ b/apps/www/src/components/layout/marketing-nav.tsx @@ -1,32 +1,82 @@ "use client"; -import { navConfig } from "@/config/nav"; import { usePathname } from "next/navigation"; import { cn } from "@/lib/utils"; import Link from "next/link"; +import { marketingPageConfig } from "@/config/pages"; +import { Icons } from "@/components/icons"; +import React from "react"; export function MarketingMainNav() { const pathname = usePathname(); + const [isHovered, setIsHovered] = React.useState(false); + const [currentHovered, setCurrentHovered] = React.useState(""); return (
-