style(theme): 深色模式配色由 slate 换成 zinc,去掉整页蓝调

slate 色阶带明显蓝调(页面底 B-R=+22、列底 +26),整页发蓝,与目标的中性灰
相差很远。换成 Tailwind 的 zinc 色阶做 1:1 映射,保持原有明暗层次不变
(卡片仍比列背景更亮),只去色偏:改后页面底 B-R=+2、列底 +2。

只替换带 dark: 前缀的类(16 个文件、182 处),外加 style.css 里三处
html.dark 基底色;浅色模式一字未动(页面底仍为 slate-100 #f1f5f9)。
This commit is contained in:
chenshoulin
2026-10-18 19:45:23 +08:00
parent b27fefb965
commit 85b2d8a30f
17 changed files with 103 additions and 99 deletions
+9 -9
View File
@@ -32,7 +32,7 @@ const TONES = {
slate: {
dot: 'bg-slate-400',
badge:
'border-slate-200 bg-slate-50 text-slate-600 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-300',
'border-slate-200 bg-slate-50 text-slate-600 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300',
},
} as const
@@ -123,23 +123,23 @@ function handleKeyMove(payload: { id: string; direction: MoveDirection }): void
<!-- 限宽居中:否则 1440px 下卡片会被拉满整屏,标题与元信息之间出现大片空白 -->
<div class="mx-auto flex w-full max-w-3xl flex-col gap-5 p-4 md:p-6">
<header class="flex flex-col gap-0.5">
<h1 class="text-xl font-semibold tracking-tight text-slate-900 md:text-2xl dark:text-slate-100">
<h1 class="text-xl font-semibold tracking-tight text-slate-900 md:text-2xl dark:text-zinc-100">
今日
</h1>
<p class="text-sm text-slate-500 dark:text-slate-400">{{ todayLabel }}</p>
<p class="text-sm text-slate-500 dark:text-zinc-400">{{ todayLabel }}</p>
</header>
<dl class="grid grid-cols-2 gap-3 md:grid-cols-4">
<div
v-for="card in statCards"
:key="card.label"
class="rounded-xl border border-slate-200 bg-white px-4 py-3.5 shadow-card dark:border-slate-800 dark:bg-slate-900"
class="rounded-xl border border-slate-200 bg-white px-4 py-3.5 shadow-card dark:border-zinc-800 dark:bg-zinc-900"
>
<dt class="flex items-center gap-1.5 text-xs text-slate-500 dark:text-slate-400">
<dt class="flex items-center gap-1.5 text-xs text-slate-500 dark:text-zinc-400">
<span class="size-1.5 rounded-full" :class="card.dot" aria-hidden="true" />
{{ card.label }}
</dt>
<dd class="mt-1.5 text-2xl font-semibold tracking-tight text-slate-900 dark:text-slate-100">
<dd class="mt-1.5 text-2xl font-semibold tracking-tight text-slate-900 dark:text-zinc-100">
{{ card.value }}
</dd>
</div>
@@ -147,14 +147,14 @@ function handleKeyMove(payload: { id: string; direction: MoveDirection }): void
<p
v-if="todayCount === 0"
class="rounded-xl border border-dashed border-slate-300 bg-white/60 px-4 py-16 text-center text-sm text-slate-400 dark:border-slate-700 dark:bg-slate-900/40 dark:text-slate-500"
class="rounded-xl border border-dashed border-slate-300 bg-white/60 px-4 py-16 text-center text-sm text-slate-400 dark:border-zinc-700 dark:bg-zinc-900/40 dark:text-zinc-500"
>
今天没有待办事项
</p>
<section v-for="section in sections" :key="section.key" class="flex flex-col gap-2">
<h2
class="flex flex-wrap items-center gap-2 text-sm font-medium text-slate-700 dark:text-slate-300"
class="flex flex-wrap items-center gap-2 text-sm font-medium text-slate-700 dark:text-zinc-300"
>
<span class="size-1.5 rounded-full" :class="TONES[section.tone].dot" aria-hidden="true" />
{{ section.title }}
@@ -165,7 +165,7 @@ function handleKeyMove(payload: { id: string; direction: MoveDirection }): void
>
{{ section.items.length }}
</span>
<span class="text-xs font-normal text-slate-400 dark:text-slate-500">
<span class="text-xs font-normal text-slate-400 dark:text-zinc-500">
{{ section.hint }}
</span>
</h2>