diff --git a/examples/openspending/components/MDXPage.tsx b/examples/openspending/components/MDXPage.tsx deleted file mode 100644 index 4d159024..00000000 --- a/examples/openspending/components/MDXPage.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { MDXRemote } from 'next-mdx-remote'; -import layouts from '../layouts'; - -export default function MDXPage({ source, frontMatter }) { - const Layout = ({ children }) => { - const layoutName = frontMatter?.layout || 'default'; - const LayoutComponent = layouts[layoutName]; - - return {children}; - }; - - return ( - - - - ); -} diff --git a/examples/openspending/layouts/blog.tsx b/examples/openspending/layouts/blog.tsx deleted file mode 100644 index 700be611..00000000 --- a/examples/openspending/layouts/blog.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { Avatar } from "@/components/Avatar"; -import { formatDate } from "@/lib/formatDate"; - -export const BlogLayout: React.FC = ({ children, ...frontMatter }) => { - const { title, date, authorsDetails } = frontMatter; - return ( -
-
-
- {title &&

{title}

} - {date && ( -

- -

- )} - {authorsDetails && ( -
- {authorsDetails.map(({ name, avatar, isDraft, url_path }) => ( - - ))} -
- )} -
-
-
{children}
-
- ); -}; \ No newline at end of file diff --git a/examples/openspending/layouts/default.tsx b/examples/openspending/layouts/default.tsx deleted file mode 100644 index ac4525f5..00000000 --- a/examples/openspending/layouts/default.tsx +++ /dev/null @@ -1,25 +0,0 @@ -export default function DefaultLayout({ children, ...frontMatter }) { - return ( -
-
-
- {/* Default layout */} - {!frontMatter.layout && ( - <> -

{frontMatter.title}

- {frontMatter.author && ( -
-

{frontMatter.author}

-
- )} - {frontMatter.description && ( -

{frontMatter.description}

- )} - - )} -
-
-
{children}
-
- ); -} diff --git a/examples/openspending/layouts/docs.tsx b/examples/openspending/layouts/docs.tsx deleted file mode 100644 index e08f5d69..00000000 --- a/examples/openspending/layouts/docs.tsx +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint import/no-default-export: off */ -import { formatDate } from "@/lib/formatDate"; - -// TODO types -export const DocsLayout: React.FC = ({ children, ...frontMatter }) => { - const { title, created } = frontMatter; - return ( -
-
-
- {created && ( -

- -

- )} - {title &&

{title}

} -
-
-
{children}
-
- ); -}; diff --git a/examples/openspending/layouts/index.ts b/examples/openspending/layouts/index.ts deleted file mode 100644 index ff226100..00000000 --- a/examples/openspending/layouts/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { - SimpleLayout, - UnstyledLayout, -} from "@flowershow/core"; -import { BlogLayout } from "./blog"; -import DefaultLayout from "./default"; -import { DocsLayout } from "./docs"; - -export default { - simple: SimpleLayout, - docs: DocsLayout, - unstyled: UnstyledLayout, - blog: BlogLayout, - default: DefaultLayout -};