From 7bf0984698e43b9aa2dd879f65951318ed410390 Mon Sep 17 00:00:00 2001 From: Maze <167211895+mazeincoding@users.noreply.github.com> Date: Sat, 31 Jan 2026 00:20:04 +0100 Subject: codebase overhaul (#697) --- apps/web/src/app/blog/page.tsx | 151 +++++++++++++++++------------------------ 1 file changed, 63 insertions(+), 88 deletions(-) (limited to 'apps/web/src/app/blog/page.tsx') diff --git a/apps/web/src/app/blog/page.tsx b/apps/web/src/app/blog/page.tsx index 08da9fd7..9e3b6d11 100644 --- a/apps/web/src/app/blog/page.tsx +++ b/apps/web/src/app/blog/page.tsx @@ -1,98 +1,73 @@ -import { Metadata } from "next"; -import { Header } from "@/components/header"; -import { Card, CardContent } from "@/components/ui/card"; -import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; +import type { Metadata } from "next"; import Link from "next/link"; -import { getPosts } from "@/lib/blog-query"; -import Image from "next/image"; +import { BasePage } from "@/app/base-page"; +import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; +import { Separator } from "@/components/ui/separator"; +import { getPosts } from "@/lib/blog/query"; +import type { Author, Post } from "@/types/blog"; export const metadata: Metadata = { - title: "Blog - OpenCut", - description: - "Read the latest news and updates about OpenCut, the free and open-source video editor.", - openGraph: { - title: "Blog - OpenCut", - description: - "Read the latest news and updates about OpenCut, the free and open-source video editor.", - type: "website", - }, + title: "Blog - OpenCut", + description: + "Read the latest news and updates about OpenCut, the free and open-source video editor.", + openGraph: { + title: "Blog - OpenCut", + description: + "Read the latest news and updates about OpenCut, the free and open-source video editor.", + type: "website", + }, }; export default async function BlogPage() { - const data = await getPosts(); - if (!data || !data.posts) return
No posts yet
; - - return ( -
-
+ const data = await getPosts(); + if (!data || !data.posts) return
No posts yet
; -
-
-
-
-
+ return ( + +
+ {data.posts.map((post) => ( +
+ + +
+ ))} +
+
+ ); +} -
-
-

- Blog -

-

- Read the latest news and updates about OpenCut, the free and - open-source video editor. -

-
-
- {data.posts.map((post) => ( - - - {post.coverImage && ( -
- {post.title} -
- )} +function BlogPostItem({ post }: { post: Post }) { + return ( + +
+
+

{post.title}

+

{post.description}

+
+ {post.authors && post.authors.length > 0 && ( + + )} +
+ + ); +} - - {post.authors && post.authors.length > 0 && ( -
- {post.authors.map((author, index) => ( -
- - - - {author.name.charAt(0).toUpperCase()} - - - - {author.name} - - {index < post.authors.length - 1 && ( - • - )} -
- ))} -
- )} -

{post.title}

-

{post.description}

-
-
- - ))} -
-
-
-
- ); +function AuthorList({ authors }: { authors: Author[] }) { + return ( +
+ {authors.map((author) => ( +
+ + + + {author.name.charAt(0).toUpperCase()} + + +
+ ))} +
+ ); } -- cgit v1.3.1