diff --git a/src/app/layout.tsx b/src/app/layout.tsx index a36cde0..984afab 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,4 +1,7 @@ +import { PropsWithChildren } from "react"; +import LandingLayout from "@/components/Landing/LandingLayout"; import type { Metadata } from "next"; +import { twMerge } from "tailwind-merge"; import localFont from "next/font/local"; import "./globals.css"; @@ -14,21 +17,23 @@ const geistMono = localFont({ }); export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", + title: "Next.js Polar starter kit", + description: "An easy to use setup for polar.sh with Next.js", }; -export default function RootLayout({ - children, -}: Readonly<{ - children: React.ReactNode; -}>) { +export const dynamic = "force-static"; +export const dynamicParams = false; + +export default function Layout({ children }: PropsWithChildren) { return ( - + - {children} + {children} ); diff --git a/src/app/page.tsx b/src/app/page.tsx index 6fe62d1..79af392 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,101 +1,42 @@ -import Image from "next/image"; +"use client"; -export default function Home() { - return ( -
-
- Next.js logo -
    -
  1. - Get started by editing{" "} - - src/app/page.tsx - - . -
  2. -
  3. Save and see your changes instantly.
  4. -
+import { Section } from "@/components/Landing/Section"; + +// import GetStartedButton from "@/components/Auth/GetStartedButton"; +// import Button from "@/components/ui/atoms/button"; -
- - Vercel logomark - Deploy now - - - Read our docs - +export default function Page() { + return ( +
+
+
+
+ + Polar - An open source monetization platform for developers | Product Hunt + +
+

+ Next.js Polar starter kit +

+
+

+ An easy to use setup for polar.sh with Next.js +

+
+
+
+
-
- +
); } diff --git a/src/components/Auth/GetStartedButton.tsx b/src/components/Auth/GetStartedButton.tsx new file mode 100644 index 0000000..5e698f6 --- /dev/null +++ b/src/components/Auth/GetStartedButton.tsx @@ -0,0 +1,45 @@ +import { CONFIG } from "@/utils/config"; +import Link from "next/link"; +import Button from "@/components/ui/atoms/button"; +import { ComponentProps } from "react"; +import { twMerge } from "tailwind-merge"; +import { ArrowRight } from "lucide-react"; + +interface GetStartedButtonProps extends ComponentProps { + text?: string; + href?: string; +} + +const GetStartedButton: React.FC = ({ + text: _text, + href: _href, + wrapperClassNames, + size = "lg", + ...props +}) => { + const text = _text || "Get started"; + + const signupPath = `${CONFIG.FRONTEND_BASE_URL}/signup?return_to/dashboard`; + const href = _href ? _href : signupPath; + + return ( + + + + ); +}; + +export default GetStartedButton; diff --git a/src/components/Brand/LogoIcon.tsx b/src/components/Brand/LogoIcon.tsx new file mode 100644 index 0000000..af864b0 --- /dev/null +++ b/src/components/Brand/LogoIcon.tsx @@ -0,0 +1,41 @@ +import { twMerge } from "tailwind-merge"; + +const LogoIcon = ({ + className, + size = 29, +}: { + className?: string; + size?: number; +}) => { + return ( + + + + + + ); +}; + +export default LogoIcon; diff --git a/src/components/Brand/LogoType.tsx b/src/components/Brand/LogoType.tsx new file mode 100644 index 0000000..30445b3 --- /dev/null +++ b/src/components/Brand/LogoType.tsx @@ -0,0 +1,63 @@ +import { twMerge } from "tailwind-merge"; + +const LogoType = ({ + className, + width, + height, +}: { + className?: string; + width?: number; + height?: number; +}) => { + return ( + + + + + + + + + + + ); +}; + +export default LogoType; diff --git a/src/components/Landing/LandingLayout.tsx b/src/components/Landing/LandingLayout.tsx new file mode 100644 index 0000000..3eef629 --- /dev/null +++ b/src/components/Landing/LandingLayout.tsx @@ -0,0 +1,70 @@ +"use client"; + +import { Section } from "@/components/Landing/Section"; +import { TopbarNavigation } from "@/components/Landing/TopbarNavigation"; +import { BrandingMenu } from "@/components/Layout/Public/BrandingMenu"; +import Footer from "@/components/Organization/Footer"; +// import { motion } from "framer-motion"; +import Link from "next/link"; +import { usePathname } from "next/navigation"; +import Button from "@/components/ui/atoms/button"; +import { PropsWithChildren, useEffect } from "react"; + +export default function Layout({ children }: PropsWithChildren) { + const pathname = usePathname(); + + useEffect(() => { + window.scroll(0, 0); + }, [pathname]); + + return ( +
+
+ +
+ {children} + +
+ ); +} + +const LandingPageTopbar = () => { + return ( +
+ + + +
+ + + +
+
+ ); +}; + +const LandingPageFooter = () => { + return ( + // +