diff --git a/app/blog/layout.tsx b/app/blog/layout.tsx new file mode 100644 index 0000000..dc71d29 --- /dev/null +++ b/app/blog/layout.tsx @@ -0,0 +1,19 @@ +import clsx from 'clsx'; +import { ReactNode } from 'react'; + +export default function PageLayout({ children }: { children: ReactNode }) { + return ( +
+

+ Blog posts +

+ +
{children}
+
+ ); +} diff --git a/app/blog/page.tsx b/app/blog/page.tsx new file mode 100644 index 0000000..559ac03 --- /dev/null +++ b/app/blog/page.tsx @@ -0,0 +1,33 @@ +import PostCard from 'components/post-card'; +import PostCardLoading from 'components/rua/loading/post-card-loading'; +import { PostPerPage, postLists } from 'lib/posts'; +import { Fragment, Suspense } from 'react'; +import Pagination from 'components/rua/rua-pagination'; + +export default async function Page() { + const posts = (await postLists()).slice(0, PostPerPage); + const next = 2; + const total = Math.ceil(posts.length / PostPerPage); + + return ( + <> + {posts.map((post) => ( + + }> + + + + ))} + + + + ); +}