fix(a11y): ink-400 对比度达标,接入 Noto Serif SC webfont,补纸张噪点与入场编排
- ink-400 #9C9587(2.90:1)→ #756F61(paper-50 4.87:1 / paper-100 4.55:1),正文级小字全部达标 - serif 栈插入 Noto Serif SC(fontsource 子集加载),Windows 不再跌进 SimSun - 首页加 feTurbulence 纸张噪点层(.grain);报头/赛程行/预测版 rise-in 错峰入场(60ms 步进) - reduce 动效用户:隐藏态与动画同在 no-preference 块,不会白屏 - Switch 提到模块顶层(修 render 重建丢焦点);a→Link(SPA 内链);h3→h2/h4→h3 修标题层级 - 按钮/输入热区抬高(btn 40px / btn-sm 32px / field py-2);index.css 硬编码色值改 :root 令牌
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* - /admin/* → 管理后台
|
||||
*/
|
||||
|
||||
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom'
|
||||
import { BrowserRouter, Routes, Route, Navigate, Link } from 'react-router-dom'
|
||||
import { ErrorBoundary } from './components/ErrorBoundary'
|
||||
import Matches from './pages/Matches'
|
||||
import { adminRoutes } from './admin/routes'
|
||||
@@ -23,9 +23,10 @@ function dateLine(): string {
|
||||
|
||||
function HomePage() {
|
||||
return (
|
||||
<div className="min-h-screen bg-paper-50">
|
||||
// grain: 纸张噪点氛围层;报头、赛程行、预测版各自带 rise-in 入场
|
||||
<div className="grain min-h-screen bg-paper-50">
|
||||
{/* ── 报头:粗线 + 居中刊名 + 报眉 ── */}
|
||||
<header className="masthead-rule">
|
||||
<header className="masthead-rule rise-in">
|
||||
<div className="mx-auto max-w-5xl px-5 sm:px-8">
|
||||
<div className="border-b border-ink-900 py-5 text-center sm:py-6">
|
||||
<h1 className="font-serif text-4xl font-bold tracking-widest text-ink-900">
|
||||
@@ -40,13 +41,13 @@ function HomePage() {
|
||||
</div>
|
||||
<div className="flex items-center justify-between border-b border-ink-200 py-2 text-2xs text-ink-500">
|
||||
<span>{dateLine()}</span>
|
||||
<a
|
||||
href="/admin"
|
||||
className="flex items-center gap-1.5 text-press hover:text-press-dark transition-colors"
|
||||
<Link
|
||||
to="/admin"
|
||||
className="flex min-h-[32px] items-center gap-1.5 text-press transition-colors hover:text-press-dark"
|
||||
>
|
||||
<span aria-hidden="true">⚙</span>
|
||||
管理后台
|
||||
</a>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user