From fb97d8857ee16cf28f5bffa48c9be9500412b6f4 Mon Sep 17 00:00:00 2001 From: Innei Date: Mon, 23 Jun 2025 13:47:37 +0800 Subject: [PATCH 1/2] chore(ssr): update global constants and clean up imports - Changed APP_NAME constant from package.json to a hardcoded value "Folo". - Removed unused import of Document from linkedom in seo.ts for cleaner code. Signed-off-by: Innei --- apps/ssr/global.ts | 4 +--- apps/ssr/src/lib/seo.ts | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/ssr/global.ts b/apps/ssr/global.ts index c564bf425..52056c3b6 100644 --- a/apps/ssr/global.ts +++ b/apps/ssr/global.ts @@ -1,7 +1,5 @@ -import { name } from "../../package.json" - export const defineGlobalConstants = () => { Object.assign(globalThis, { - APP_NAME: name, + APP_NAME: "Folo", }) } diff --git a/apps/ssr/src/lib/seo.ts b/apps/ssr/src/lib/seo.ts index 696df7254..d5e41c611 100644 --- a/apps/ssr/src/lib/seo.ts +++ b/apps/ssr/src/lib/seo.ts @@ -1,4 +1,3 @@ -import type { Document } from "linkedom" import xss from "xss" export function buildSeoMetaTags( From 3d6c3e05789c749195e24f0ec3c0997ece812e87 Mon Sep 17 00:00:00 2001 From: Innei Date: Mon, 23 Jun 2025 14:23:39 +0800 Subject: [PATCH 2/2] feat: redeisgn og Signed-off-by: Innei --- apps/ssr/src/router/og/__base.tsx | 132 +++++++++++++++++------------- apps/ssr/src/router/og/feed.tsx | 69 ++++++++-------- apps/ssr/src/router/og/list.tsx | 69 ++++++++-------- apps/ssr/src/router/og/user.tsx | 63 +++++++------- 4 files changed, 174 insertions(+), 159 deletions(-) diff --git a/apps/ssr/src/router/og/__base.tsx b/apps/ssr/src/router/og/__base.tsx index 8fe84e835..c91d7f53c 100644 --- a/apps/ssr/src/router/og/__base.tsx +++ b/apps/ssr/src/router/og/__base.tsx @@ -7,17 +7,16 @@ export const OGCanvas = ({ children, seed }: { children: React.ReactNode; seed: return (
- {/* Subtle background pattern */} + {/* Background Grid Pattern */}
- - {/* Grid pattern overlay */} + {/* Background Glows */}
- {/* Main content card */} + {/* Main layout container */}
- {/* Brand mark */} + {/* Header */}
- - - Folo - + {/* Follow Logo */} +
+ + + Folo + +
+ + {/* AI RSS */} +
+ Follow everything in one place + +
- {children} + {/* Content */} +
+ {children} +
) } +function RSSIcon({ color }: { color: string }) { + return ( + + + + ) +} + function FollowIcon() { return ( - - + + ; title: string }> = base64, title, }) => { - const [, , , bgAccent, bgAccentLight, bgAccentUltraLight] = getBackgroundGradient(title) + const [, , , bgAccent, bgAccentLight] = getBackgroundGradient(title) return ( <> {base64 ? ( @@ -155,12 +174,11 @@ export const OGAvatar: React.FC<{ base64?: Nullable; title: string }> =
@@ -168,20 +186,20 @@ export const OGAvatar: React.FC<{ base64?: Nullable; title: string }> =
{
-
-
-

- {title} -

- {description && ( -

- {description} -

- )} - + {title} + + {description && ( +

+ {description} +

+ )} +

{formatNumber(feed.data.subscriptionCount || 0)} followers with{" "} diff --git a/apps/ssr/src/router/og/list.tsx b/apps/ssr/src/router/og/list.tsx index 2e7ce35b2..1b9da51e0 100644 --- a/apps/ssr/src/router/og/list.tsx +++ b/apps/ssr/src/router/og/list.tsx @@ -37,55 +37,56 @@ export const renderListOG = async (apiClient: ApiClient, listId: string) => {

-
-
-

- {title} -

- {description && ( -

- {description} -

- )} - + {title} + + {description && ( +

+ {description} +

+ )} +

{numberFormatter.format(feed.data.subscriptionCount)} followers with{" "} diff --git a/apps/ssr/src/router/og/user.tsx b/apps/ssr/src/router/og/user.tsx index afd1d0aab..d255e0e36 100644 --- a/apps/ssr/src/router/og/user.tsx +++ b/apps/ssr/src/router/og/user.tsx @@ -27,52 +27,47 @@ export const renderUserOG = async (apiClient: ApiClient, id: string) => {

-
-
-

- {user.data.name} -

- {user.data.handle && ( -

- @{user.data.handle} -

- )} + {user.data.name} + + {user.data.handle && ( +

+ @{user.data.handle} +

+ )} +
, {