From 7b91944fbf60c27d21274ddb7f28f97344c89ef5 Mon Sep 17 00:00:00 2001 From: molvqingtai Date: Wed, 30 Oct 2024 22:33:09 +0800 Subject: [PATCH] perf: optimize theme style --- src/app/content/views/Footer/index.tsx | 2 +- src/components/Markdown.tsx | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/app/content/views/Footer/index.tsx b/src/app/content/views/Footer/index.tsx index a6acf9d..3a4714a 100644 --- a/src/app/content/views/Footer/index.tsx +++ b/src/app/content/views/Footer/index.tsx @@ -323,7 +323,7 @@ const Footer: FC = () => { {user.username.at(0)} -
{user.username}
+
{user.username}
)} > diff --git a/src/components/Markdown.tsx b/src/components/Markdown.tsx index 34c8db9..797c651 100644 --- a/src/components/Markdown.tsx +++ b/src/components/Markdown.tsx @@ -46,12 +46,21 @@ const Markdown: FC = ({ children = '', className }) => { urlTransform={urlTransform} components={{ h1: ({ className, ...props }) => ( -

+

+ ), + h2: ({ className, ...props }) => ( +

+ ), + h3: ({ className, ...props }) => ( +

+ ), + h4: ({ className, ...props }) => ( +

), - h2: ({ className, ...props }) =>

, img: ({ className, alt, ...props }) => ( {alt} ), + strong: ({ className, ...props }) => , a: ({ className, ...props }) => (