diff --git a/assets/js/react/components/Border.tsx b/assets/js/react/components/Border.tsx new file mode 100644 index 0000000..ea5516b --- /dev/null +++ b/assets/js/react/components/Border.tsx @@ -0,0 +1,37 @@ +import * as React from "react" +import clsx from "clsx" + +type BorderProps = { + as?: T + className?: string + position?: "top" | "left" + invert?: boolean +} + +export function Border({ + as, + className, + position = "top", + invert = false, + ...props +}: Omit, keyof BorderProps> & + BorderProps) { + let Component = as ?? "div" + + return ( + + ) +} diff --git a/assets/js/react/components/GridList.tsx b/assets/js/react/components/GridList.tsx new file mode 100644 index 0000000..4594883 --- /dev/null +++ b/assets/js/react/components/GridList.tsx @@ -0,0 +1,60 @@ +import * as React from "react" +import clsx from "clsx" + +import { Border } from "./Border" + +export function GridList({ + children, + className, +}: { + children: React.ReactNode + className?: string +}) { + return ( +
    + {children} +
+ ) +} + +export function GridListItem({ + title, + children, + className, + invert = false, +}: { + title: string + children: React.ReactNode + className?: string + invert?: boolean +}) { + return ( +
  • + + + {title}. + {" "} + {children} + +
  • + ) +} diff --git a/assets/js/react/components/PageIntro.tsx b/assets/js/react/components/PageIntro.tsx new file mode 100644 index 0000000..d9afbb7 --- /dev/null +++ b/assets/js/react/components/PageIntro.tsx @@ -0,0 +1,48 @@ +import * as React from "react" +import clsx from "clsx" + +import { Container } from "./Container" +import { FadeIn } from "./FadeIn" + +export function PageIntro({ + eyebrow, + title, + children, + centered = false, +}: { + eyebrow: string + title: string | React.ReactNode + children: React.ReactNode + centered?: boolean +}) { + return ( + + +

    + + {eyebrow} + + - + + {title} + +

    +
    + {children} +
    +
    +
    + ) +} diff --git a/assets/js/react/components/SectionIntro.tsx b/assets/js/react/components/SectionIntro.tsx new file mode 100644 index 0000000..995ad4b --- /dev/null +++ b/assets/js/react/components/SectionIntro.tsx @@ -0,0 +1,65 @@ +import * as React from "react" +import clsx from "clsx" + +import { Container } from "./Container" + +export function SectionIntro({ + title, + eyebrow, + children, + smaller = false, + invert = false, + ...props +}: Omit< + React.ComponentPropsWithoutRef, + "title" | "children" +> & { + title: string + eyebrow?: string + children?: React.ReactNode + smaller?: boolean + invert?: boolean +}) { + return ( + +
    +

    + {eyebrow && ( + <> + + {eyebrow} + + - + + )} + + {title} + +

    + {children && ( +
    + {children} +
    + )} +
    +
    + ) +} diff --git a/assets/js/react/pages/About.tsx b/assets/js/react/pages/About.tsx new file mode 100644 index 0000000..ec08a45 --- /dev/null +++ b/assets/js/react/pages/About.tsx @@ -0,0 +1,29 @@ +import * as React from "react" + +import { PageIntro } from "../components/PageIntro" + +const Title = ( + + The{" "} + + BoardWise + {" "} + Mission + +) + +export function About() { + return ( + <> + +

    A better approach to finding the right coach for you.

    +

    + We are a small group of chess enthusiasts dedicated to helping other + players improve their game as efficiently as they can. We{"'"}re + starting this initiative the best way we know how - with experts in + the field. +

    +
    + + ) +} diff --git a/assets/js/react/pages/Contact.tsx b/assets/js/react/pages/Contact.tsx new file mode 100644 index 0000000..ecb7138 --- /dev/null +++ b/assets/js/react/pages/Contact.tsx @@ -0,0 +1,13 @@ +import * as React from "react" + +import { PageIntro } from "../components/PageIntro" + +export function Contact() { + return ( + <> + +

    Tell us how we can improve our site.

    +
    + + ) +} diff --git a/assets/js/react/router.tsx b/assets/js/react/router.tsx index 08e6ef0..650767a 100644 --- a/assets/js/react/router.tsx +++ b/assets/js/react/router.tsx @@ -2,6 +2,8 @@ import * as React from "react" import { createBrowserRouter } from "react-router-dom" import { FallbackMessage } from "./components/FallbackMessage" +import { About } from "./pages/About" +import { Contact } from "./pages/Contact" import { Search } from "./pages/Search" export const router = createBrowserRouter([ @@ -9,6 +11,14 @@ export const router = createBrowserRouter([ path: "/", element: , }, + { + path: "/about/", + element: , + }, + { + path: "/contact/", + element: , + }, { path: "*", element: (