From 1f2bf7a42b99cf38d1904d9510a9cd1f20969bc2 Mon Sep 17 00:00:00 2001 From: Joel Date: Mon, 9 Mar 2026 11:31:54 +0800 Subject: [PATCH] chore: handle header ui --- .../remark-directive-test/page.tsx | 1 - web/app/components/app/in-site-message.tsx | 20 ++++------- web/public/in-site-message/header-bg.svg | 33 +++++++++++++++++++ 3 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 web/public/in-site-message/header-bg.svg diff --git a/web/app/(commonLayout)/remark-directive-test/page.tsx b/web/app/(commonLayout)/remark-directive-test/page.tsx index 1a6bc4b254..e0013108f6 100644 --- a/web/app/(commonLayout)/remark-directive-test/page.tsx +++ b/web/app/(commonLayout)/remark-directive-test/page.tsx @@ -79,7 +79,6 @@ export default function RemarkDirectiveTestPage() { { - if (!title_pic_url) { - return { - background: 'linear-gradient(180deg, #3268f4 0%, #194ccf 100%)', - } - } - return { - backgroundImage: `linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.4) 100%), url(${title_pic_url})`, - backgroundPosition: 'center', - backgroundSize: 'cover', + backgroundImage: `url(${headerBgUrl})`, } - }, [title_pic_url]) + }, [headerBgUrl]) const handleAction = (item: InSiteMessageActionItem) => { if (item.action === 'close') { @@ -95,7 +87,7 @@ function InSiteMessage({ className, )} > -
+
{title}
@@ -104,7 +96,7 @@ function InSiteMessage({
-
+
diff --git a/web/public/in-site-message/header-bg.svg b/web/public/in-site-message/header-bg.svg new file mode 100644 index 0000000000..da1f0ca5e8 --- /dev/null +++ b/web/public/in-site-message/header-bg.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +