Skip to content

Commit 5c8a9b7

Browse files
authored
Merge pull request #313 from ssoda01/feat/add-dark-theme-config
feat: add dark theme config #310
2 parents d92296c + 05a1885 commit 5c8a9b7

File tree

13 files changed

+118
-29
lines changed

13 files changed

+118
-29
lines changed

src/components/ActionCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ const InlineCondition: FCC<{
106106
title?: string
107107
}> = ({ title, children }) => (
108108
<div className="min-w-[5em] text-lg leading-none">
109-
<span className="text-zinc-500 mr-0.5 tabular-nums font-bold">
109+
<span className="text-zinc-500 dark:text-slate-100 mr-0.5 tabular-nums font-bold">
110110
{children}
111111
</span>
112-
<span className="text-zinc-400 text-xs">{title}</span>
112+
<span className="text-zinc-400 dark:text-slate-200 text-xs">{title}</span>
113113
</div>
114114
)

src/components/FactItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export const FactItem: FCC<{
1919
className,
2020
)}
2121
>
22-
{icon && <Icon icon={icon} className="mr-2 text-zinc-500" />}
23-
<div className="text-sm mr-2 text-zinc-500">{title}</div>
22+
{icon && <Icon icon={icon} className="mr-2 text-zinc-500 dark:text-slate-100" />}
23+
<div className="text-sm mr-2 text-zinc-500 dark:text-slate-100">{title}</div>
2424
{children}
2525
</div>
2626
)

src/components/HelperText.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const HelperText: FCC<{
2222
}
2323

2424
return (
25-
<div className={clsx('flex text-gray-600 text-xs items-center', className)}>
25+
<div className={clsx('flex text-gray-600 dark:text-zinc-400 text-xs items-center', className)}>
2626
<Icon icon="info-sign" size={12} className="mr-1.5" />
2727
<div>{child()}</div>
2828
</div>

src/components/OperationCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const NeoOperationCard = ({ operation }: { operation: Operation }) => {
6161
/>
6262
</div>
6363
<div>
64-
<div className="text-sm text-zinc-600 mb-2 font-bold">
64+
<div className="text-sm text-zinc-600 dark:text-slate-100 mb-2 font-bold">
6565
干员/干员组
6666
</div>
6767
<OperatorTags operation={operation} />
@@ -187,7 +187,7 @@ export const OperationCard = ({ operation }: { operation: Operation }) => {
187187
/>
188188
</div>
189189
<div className="md:w-1/2">
190-
<div className="text-sm text-zinc-600 mb-2 font-bold">
190+
<div className="text-sm text-zinc-600 dark:text-slate-100 mb-2 font-bold">
191191
干员/干员组
192192
</div>
193193
<OperatorTags operation={operation} />

src/components/drawer/NavAside.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const NavAside = () => {
2323
<div className="flex-col w-full" key={link.to}>
2424
<NavLink
2525
to={link.to}
26-
className="text-sm text-zinc-600 !no-underline"
26+
className="text-sm text-zinc-600 dark:text-slate-100 !no-underline"
2727
onClick={() => toggleNav()}
2828
>
2929
{({ isActive }) => (

src/components/entity/EDifficulty.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const DifficultyTag: FC<{
3232
'transition border border-solid !text-xs cursor-help tracking-tight !px-2 !py-1 !mx-1 !my-1 leading-none !min-h-0',
3333
hardLevel
3434
? 'bg-red-400 hover:bg-red-500 border-red-700 text-red-900'
35-
: 'bg-slate-200 hover:bg-slate-300 border-slate-300 text-slate-700',
35+
: 'bg-slate-200 hover:bg-slate-300 border-slate-300 text-slate-700 dark:bg-slate-900 dark:text-slate-100',
3636
)}
3737
>
3838
{content}

src/components/entity/ELevel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const NeoELevel: FC<{
2020
}
2121

2222
return (
23-
<Tag className="transition border border-solid !text-xs tracking-tight !px-2 !py-1 !my-1 leading-none !min-h-0 bg-slate-200 border-slate-300 text-slate-700">
23+
<Tag className="transition border border-solid !text-xs tracking-tight !px-2 !py-1 !my-1 leading-none !min-h-0 bg-slate-200 border-slate-300 text-slate-700 dark:bg-slate-900 dark:text-slate-100">
2424
<div className="flex items-center">
2525
<div className="flex whitespace-pre">
2626
<span className="inline-block font-bold my-auto">{catThree}</span>
@@ -47,7 +47,7 @@ export const ELevel: FC<{
4747
}
4848

4949
return (
50-
<Tag className="transition border border-solid !text-xs tracking-tight !p-1 leading-none !min-h-0 bg-slate-200 border-slate-300 text-slate-700">
50+
<Tag className="transition border border-solid !text-xs tracking-tight !p-1 leading-none !min-h-0 dark:bg-slate-900 dark:text-slate-100">
5151
<div className="flex items-center mx-1">
5252
<div className="flex flex-col mr-2">
5353
<H4 className="inline-block font-bold my-auto">{catThree}</H4>

src/components/viewer/OperationRating.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ export const OperationRating: FC<{
8080
layout === 'horizontal' ? IconSize.STANDARD : IconSize.LARGE
8181
}
8282
icon="star-empty"
83-
className="text-zinc-600"
83+
className="text-zinc-600 dark:text-slate-100"
8484
/>
8585
}
8686
readonly
8787
/>
8888
)}
8989
<div
9090
className={clsx(
91-
'text-sm text-zinc-500',
91+
'text-sm text-zinc-500 dark:text-slate-100',
9292
layout === 'horizontal' && !operation.notEnoughRating && 'mr-1.5',
9393
)}
9494
>

src/components/viewer/OperationSetViewer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,13 @@ function OperationSetViewerInner({
219219

220220
<div className="flex flex-col items-start select-none tabular-nums">
221221
<FactItem title="发布于" icon="time">
222-
<span className="text-gray-800 font-bold">
222+
<span className="text-gray-800 dark:text-slate-100 font-bold">
223223
<RelativeTime moment={operationSet.createTime} />
224224
</span>
225225
</FactItem>
226226

227227
<FactItem title="作者" icon="user">
228-
<span className="text-gray-800 font-bold">
228+
<span className="text-gray-800 dark:text-slate-100 font-bold">
229229
{operationSet.creator}
230230
</span>
231231
</FactItem>

src/components/viewer/OperationViewer.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,17 +339,17 @@ function OperationViewerInner({
339339

340340
<div className="flex flex-col items-start select-none tabular-nums">
341341
<FactItem title="浏览量" icon="eye-open">
342-
<span className="text-gray-800 font-bold">{operation.views}</span>
342+
<span className="text-gray-800 dark:text-slate-100 font-bold">{operation.views}</span>
343343
</FactItem>
344344

345345
<FactItem title="发布于" icon="time">
346-
<span className="text-gray-800 font-bold">
346+
<span className="text-gray-800 dark:text-slate-100 font-bold">
347347
<RelativeTime moment={operation.uploadTime} />
348348
</span>
349349
</FactItem>
350350

351351
<FactItem title="作者" icon="user">
352-
<span className="text-gray-800 font-bold">
352+
<span className="text-gray-800 dark:text-slate-100 font-bold">
353353
{operation.uploader}
354354
</span>
355355
</FactItem>

0 commit comments

Comments
 (0)