From 3a0f5fa0bbc907e81a0ddf2f8728a36761499928 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sat, 7 Jun 2025 17:03:02 +0000 Subject: feat(ui): Improve the look of the public bookmarks page --- apps/web/app/public/layout.tsx | 9 +-- apps/web/app/public/lists/[listId]/page.tsx | 18 ++---- .../components/public/lists/PublicListHeader.tsx | 64 ++++++++++++++++++++-- 3 files changed, 66 insertions(+), 25 deletions(-) (limited to 'apps') diff --git a/apps/web/app/public/layout.tsx b/apps/web/app/public/layout.tsx index 4203c44c..b4628e11 100644 --- a/apps/web/app/public/layout.tsx +++ b/apps/web/app/public/layout.tsx @@ -1,16 +1,11 @@ -import KarakeepLogo from "@/components/KarakeepIcon"; - export default function PublicLayout({ children, }: { children: React.ReactNode; }) { return ( -
-
- -
-
{children}
+
+
{children}
); } diff --git a/apps/web/app/public/lists/[listId]/page.tsx b/apps/web/app/public/lists/[listId]/page.tsx index cdfc46d0..4a4ce414 100644 --- a/apps/web/app/public/lists/[listId]/page.tsx +++ b/apps/web/app/public/lists/[listId]/page.tsx @@ -3,7 +3,6 @@ import { notFound } from "next/navigation"; import NoBookmarksBanner from "@/components/dashboard/bookmarks/NoBookmarksBanner"; import PublicBookmarkGrid from "@/components/public/lists/PublicBookmarkGrid"; import PublicListHeader from "@/components/public/lists/PublicListHeader"; -import { Separator } from "@/components/ui/separator"; import { api } from "@/server/api/client"; import { TRPCError } from "@trpc/server"; @@ -50,22 +49,15 @@ export default async function PublicListPage({ listId: params.listId, }); return ( -
-
- - {list.icon} {list.name} - {list.description && ( - - {`(${list.description})`} - - )} - -
- +
{list.numItems > 0 ? ( diff --git a/apps/web/components/public/lists/PublicListHeader.tsx b/apps/web/components/public/lists/PublicListHeader.tsx index 1f016351..acdb845a 100644 --- a/apps/web/components/public/lists/PublicListHeader.tsx +++ b/apps/web/components/public/lists/PublicListHeader.tsx @@ -1,17 +1,71 @@ +import Link from "next/link"; +import KarakeepLogo from "@/components/KarakeepIcon"; +import { buttonVariants } from "@/components/ui/button"; +import { BookmarkIcon, RssIcon } from "lucide-react"; + export default function PublicListHeader({ list, }: { list: { id: string; + name: string; + description: string | null | undefined; + icon: string; + ownerName: string; numItems: number; }; }) { + const rssLink = `/api/v1/rss/lists/${list.id}`; return ( -
- -

- {list.numItems} bookmarks -

+
+
+ +
+ {/* Header */} +
+ + {list.icon} + +
+

+ {list.name} +

+ {list.description && list.description.length > 0 && ( +

+ {list.description} +

+ )} +
+
+ {/* Created by */} +
+
+ {list.ownerName[0]?.toUpperCase()} +
+
+

Created by

+

{list.ownerName}

+
+
+
+ {/* Options */} +
+
+ + {list.numItems} bookmarks +
+ + + +
+
); } -- cgit v1.2.3-70-g09d2