From ca32f687872bb122f87b2df153d9d2ab7590fbd6 Mon Sep 17 00:00:00 2001 From: StarHeart Date: Mon, 8 Apr 2024 20:22:29 +0800 Subject: [PATCH] =?UTF-8?q?:memo:=20Docs:=20=E5=95=86=E5=BA=97=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4=20(#2633)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/src/components/Resource/Card/index.tsx | 7 +++++-- website/src/components/Resource/Card/styles.css | 10 +++++++--- .../src/components/Resource/DetailCard/index.tsx | 10 +++------- .../src/components/Resource/ValidStatus/index.tsx | 13 ++++++------- website/tailwind.config.js | 1 + 5 files changed, 22 insertions(+), 19 deletions(-) diff --git a/website/src/components/Resource/Card/index.tsx b/website/src/components/Resource/Card/index.tsx index 1e312707..5a990d48 100644 --- a/website/src/components/Resource/Card/index.tsx +++ b/website/src/components/Resource/Card/index.tsx @@ -40,8 +40,10 @@ export default function ResourceCard({ return (
-
- {resource.name} +
+
+
{resource.name}
+
{resource.is_official && ( )} {resource.name} {resource.is_official && ( -
+
官方
)} @@ -189,9 +189,7 @@ export default function ResourceDetailCard({ resource }: Props) { href={homepageLink} target="_blank" rel="noreferrer" - className={ - homepageLink ? "hover:underline hover:text-primary" : undefined - } + className={homepageLink && "hover:underline hover:text-primary"} > {moduleName} @@ -204,9 +202,7 @@ export default function ResourceDetailCard({ resource }: Props) { target="_blank" rel="noreferrer" className={ - pypiProjectLink - ? "hover:underline hover:text-primary" - : undefined + pypiProjectLink && "hover:underline hover:text-primary" } > {projectLink} diff --git a/website/src/components/Resource/ValidStatus/index.tsx b/website/src/components/Resource/ValidStatus/index.tsx index c5fd8cd2..52149a66 100644 --- a/website/src/components/Resource/ValidStatus/index.tsx +++ b/website/src/components/Resource/ValidStatus/index.tsx @@ -59,13 +59,12 @@ export default function ValidDisplay({ className={clsx({ "rounded-md text-sm flex items-center gap-x-1 px-2 py-1 whitespace-nowrap": !simple, - "ml-2": simple, - "bg-success/10": !simple && isValid, - "text-success/90": isValid, - "bg-error/10": !simple && isInvalid, - "text-error/90": isInvalid, - "bg-info/10": !simple && isSkip, - "text-info/90": isSkip, + "bg-green-400/10": !simple && isValid, + "text-green-600 dark:text-green-400": isValid, + "bg-red-400/10": !simple && isInvalid, + "text-red-600 dark:text-red-400": isInvalid, + "bg-blue-400/10": !simple && isSkip, + "text-blue-600 dark:text-blue-400": isSkip, })} > diff --git a/website/tailwind.config.js b/website/tailwind.config.js index e5b9a6c5..64ae91c5 100644 --- a/website/tailwind.config.js +++ b/website/tailwind.config.js @@ -17,6 +17,7 @@ function excludeThemeColor(theme, exclude) { } module.exports = { + darkMode: ["class", '[data-theme="dark"]'], daisyui: { themes: [ {