From 05a1885ecdc35190384cc3a1b9b42c1139aa8c17 Mon Sep 17 00:00:00 2001 From: ssoda01 <1443898356@qq.com> Date: Thu, 13 Jun 2024 17:45:09 +0800 Subject: [PATCH] feat: add dark theme config #310 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat: 修复部分样式问题 feat: add color name feat: fix less code feat: update dark theme config feat: add dark theme --- src/components/ActionCard.tsx | 4 +- src/components/FactItem.tsx | 4 +- src/components/HelperText.tsx | 2 +- src/components/OperationCard.tsx | 4 +- src/components/drawer/NavAside.tsx | 2 +- src/components/entity/EDifficulty.tsx | 2 +- src/components/entity/ELevel.tsx | 4 +- src/components/viewer/OperationRating.tsx | 4 +- src/components/viewer/OperationSetViewer.tsx | 4 +- src/components/viewer/OperationViewer.tsx | 6 +- src/layouts/AppLayout.tsx | 2 +- src/pages/index.tsx | 4 +- src/styles/blueprint.less | 105 +++++++++++++++++-- 13 files changed, 118 insertions(+), 29 deletions(-) diff --git a/src/components/ActionCard.tsx b/src/components/ActionCard.tsx index b890cda0..00458cd6 100644 --- a/src/components/ActionCard.tsx +++ b/src/components/ActionCard.tsx @@ -106,9 +106,9 @@ const InlineCondition: FCC<{ title?: string }> = ({ title, children }) => (
- + {children} - {title} + {title}
) diff --git a/src/components/FactItem.tsx b/src/components/FactItem.tsx index 5c147269..c57df083 100644 --- a/src/components/FactItem.tsx +++ b/src/components/FactItem.tsx @@ -19,8 +19,8 @@ export const FactItem: FCC<{ className, )} > - {icon && } -
{title}
+ {icon && } +
{title}
{children} ) diff --git a/src/components/HelperText.tsx b/src/components/HelperText.tsx index 27bd3d3e..6c851254 100644 --- a/src/components/HelperText.tsx +++ b/src/components/HelperText.tsx @@ -22,7 +22,7 @@ export const HelperText: FCC<{ } return ( -
+
{child()}
diff --git a/src/components/OperationCard.tsx b/src/components/OperationCard.tsx index 2ae56114..6cbeceb7 100644 --- a/src/components/OperationCard.tsx +++ b/src/components/OperationCard.tsx @@ -61,7 +61,7 @@ export const NeoOperationCard = ({ operation }: { operation: Operation }) => { />
-
+
干员/干员组
@@ -187,7 +187,7 @@ export const OperationCard = ({ operation }: { operation: Operation }) => { />
-
+
干员/干员组
diff --git a/src/components/drawer/NavAside.tsx b/src/components/drawer/NavAside.tsx index b83049fa..9c829590 100644 --- a/src/components/drawer/NavAside.tsx +++ b/src/components/drawer/NavAside.tsx @@ -23,7 +23,7 @@ export const NavAside = () => {
toggleNav()} > {({ isActive }) => ( diff --git a/src/components/entity/EDifficulty.tsx b/src/components/entity/EDifficulty.tsx index d32532af..5afd8ce5 100644 --- a/src/components/entity/EDifficulty.tsx +++ b/src/components/entity/EDifficulty.tsx @@ -32,7 +32,7 @@ const DifficultyTag: FC<{ 'transition border border-solid !text-xs cursor-help tracking-tight !px-2 !py-1 !mx-1 !my-1 leading-none !min-h-0', hardLevel ? 'bg-red-400 hover:bg-red-500 border-red-700 text-red-900' - : 'bg-slate-200 hover:bg-slate-300 border-slate-300 text-slate-700', + : 'bg-slate-200 hover:bg-slate-300 border-slate-300 text-slate-700 dark:bg-slate-900 dark:text-slate-100', )} > {content} diff --git a/src/components/entity/ELevel.tsx b/src/components/entity/ELevel.tsx index 099ad158..8948d244 100644 --- a/src/components/entity/ELevel.tsx +++ b/src/components/entity/ELevel.tsx @@ -20,7 +20,7 @@ export const NeoELevel: FC<{ } return ( - +
{catThree} @@ -47,7 +47,7 @@ export const ELevel: FC<{ } return ( - +

{catThree}

diff --git a/src/components/viewer/OperationRating.tsx b/src/components/viewer/OperationRating.tsx index 4f611a9b..dc7a2869 100644 --- a/src/components/viewer/OperationRating.tsx +++ b/src/components/viewer/OperationRating.tsx @@ -80,7 +80,7 @@ export const OperationRating: FC<{ layout === 'horizontal' ? IconSize.STANDARD : IconSize.LARGE } icon="star-empty" - className="text-zinc-600" + className="text-zinc-600 dark:text-slate-100" /> } readonly @@ -88,7 +88,7 @@ export const OperationRating: FC<{ )}
diff --git a/src/components/viewer/OperationSetViewer.tsx b/src/components/viewer/OperationSetViewer.tsx index 914bb59b..2c48c960 100644 --- a/src/components/viewer/OperationSetViewer.tsx +++ b/src/components/viewer/OperationSetViewer.tsx @@ -219,13 +219,13 @@ function OperationSetViewerInner({
- + - + {operationSet.creator} diff --git a/src/components/viewer/OperationViewer.tsx b/src/components/viewer/OperationViewer.tsx index 62ddd20a..638a0b1b 100644 --- a/src/components/viewer/OperationViewer.tsx +++ b/src/components/viewer/OperationViewer.tsx @@ -339,17 +339,17 @@ function OperationViewerInner({
- {operation.views} + {operation.views} - + - + {operation.uploader} diff --git a/src/layouts/AppLayout.tsx b/src/layouts/AppLayout.tsx index 467a336d..372f0161 100644 --- a/src/layouts/AppLayout.tsx +++ b/src/layouts/AppLayout.tsx @@ -53,7 +53,7 @@ export const AppLayout: FCC = ({ children }) => ( {({ isActive }) => (