diff --git a/components/Alert.tsx b/components/Alert.tsx new file mode 100644 index 0000000..f0a4380 --- /dev/null +++ b/components/Alert.tsx @@ -0,0 +1,39 @@ +import { Container } from "./Container"; +// import { EXAMPLE_PATH } from "@/lib/constants"; +import cn from "classnames"; + +type Props = { + preview?: boolean; +}; + +export function Alert({ preview }: Props) { + return ( +
+ +
+ {preview ? ( + <> + This page is a preview.{" "} + + Click here + {" "} + to exit preview mode + + ) : ( + <> + The source code for this blog is available on GitHub + + )} +
+
+
+ ); +} diff --git a/components/Avatar.tsx b/components/Avatar.tsx new file mode 100644 index 0000000..3979214 --- /dev/null +++ b/components/Avatar.tsx @@ -0,0 +1,15 @@ +// import Image from "next/image"; + +type Props = { + name: string; + picture: string; +}; + +export function Avatar({ name, picture }: Props) { + return ( +
+ {name} +
{name}
+
+ ); +} diff --git a/components/Container.tsx b/components/Container.tsx new file mode 100644 index 0000000..a8bb15c --- /dev/null +++ b/components/Container.tsx @@ -0,0 +1,7 @@ +type Props = { + children?: React.ReactNode; +}; + +export function Container({ children }: Props) { + return
{children}
; +} diff --git a/components/Footer.tsx b/components/Footer.tsx index 6c105d3..77a026a 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -1,4 +1,4 @@ -import { Container } from "./container"; +import { Container } from "./Container"; // import { EXAMPLE_PATH } from "@/lib/constants"; export function Footer() { diff --git a/components/Header.tsx b/components/Header.tsx new file mode 100644 index 0000000..64d1401 --- /dev/null +++ b/components/Header.tsx @@ -0,0 +1,11 @@ +import Link from "next/link"; + +export function Header() { + return ( +

+ + Blog + +

+ ); +} diff --git a/components/HeroPost.tsx b/components/HeroPost.tsx index 91418f4..b6deae7 100644 --- a/components/HeroPost.tsx +++ b/components/HeroPost.tsx @@ -1,6 +1,6 @@ import { Avatar } from "./Avatar"; import { CoverImage } from "./CoverImage"; -import { type Author } from "../interfaces/author"; +import { type Author } from "interfaces/author"; import Link from "next/link"; import { DateFormatter } from "./DateFormatter"; diff --git a/components/Intro.tsx b/components/Intro.tsx new file mode 100644 index 0000000..bd12951 --- /dev/null +++ b/components/Intro.tsx @@ -0,0 +1,21 @@ +import { CMS_NAME } from "lib/constants"; + +export function Intro() { + return ( +
+

+ Blog +

+

+ A statically generated blog example using{" "} + + Next.js + {" "} + and {CMS_NAME}. +

+
+ ); +}