Files
novalon-website/.gitignore
T
zhangxiang d959fa9a81 refactor(theme): 营销页 bg-white token 化(暗黑模式 Phase 2 · marketing 批次)
问题:Tailwind 原生 bg-white 是硬编码值,深色主题下不翻转,
导致整页/整 section 恒为纯白,与转深色的页头页脚割裂。
(globals.css:--color-bg-primary-rgb 浅色 255 255 255 → 深色 10 14 20)

改动:10 文件 67 处 bg-white → 项目 token,按语义二分类
- bg-bg-primary  (33 处):页面/大块骨架(min-h-screen 容器、<section>、<main>)
- bg-bg-elevated (34 处):浮起层(带 border 的卡片、表单输入、图标盒、grid 单元格)
  --color-bg-elevated 浅色 #FFFFFF → 深色 #151B23,同样翻转。

浅色主题下 bg-white / bg-bg-primary / bg-bg-elevated 三者同值(纯白),
故本次改动在浅色主题下零像素差异,只修复深色主题。

新增审计工具:
- scripts/audit/hardcoded-color-audit.mjs:硬编码颜色分级盘点
  (含 alpha 误报修正:bg-white/NN 半透明叠加两主题均成立,判 INFO 非 P0)
- scripts/audit/darkmode-bg-verify.mjs:直接验证背景随主题翻转
  (浅色应纯白、深色应 rgb(10,14,20) 且无残留纯白块)

审计结果:marketing P0 67 → 0;全站 P0 97 → 30
(剩余 components 16 / other 8 / layout 3 / ui-kit 3 为第二批;admin 本就为 0)

门禁:
- tsc 0 error
- eslint 0 error(50 warnings 全为既有,改动文件未新增)
- jest 129/130 套件通过,1548 通过 / 2 跳过 / **0 断言失败**
  唯一失败 src/lib/admin-api.test.ts 为**沙箱环境限制非代码问题**:
  CODEBUDDY_BROKER_DENY 拦截 readFileSync,单独复验同样失败,
  与本次改动零交集(改动仅限 src/app/(marketing)/ 下 10 个页面组件)
- 暗黑模式背景验证 18/18 PASS(9 路由 × 浅深双版)
2026-09-20 11:50:58 +08:00

341 lines
6.3 KiB
Plaintext

# ============================================================
# Dependencies
# ============================================================
node_modules/
.pnpm-store/
.pnp/
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions
# ============================================================
# Build Outputs
# ============================================================
.next/
out/
.swc/
build/
dist/
.cache/
.turbo/
*.tgz
*.local
dist-ssr/
dist_backup/
# ============================================================
# Testing & Coverage
# ============================================================
coverage/
.nyc_output/
*.lcov
# Playwright
test-results/
playwright-report/
playwright/.cache/
*.traces/
playwright-traces/
# E2E test results
e2e/test-results/
e2e/playwright-report/
e2e/allure-results/
e2e/allure-report/
e2e/.last-run.json
e2e/junit.xml
e2e/test-report.md
# Test Framework
test-framework/node_modules/
test-framework/test-results/
test-framework/playwright-report/
test-framework/allure-results/
test-framework/allure-report/
test-framework/reports/
# Allure reports
allure-results/
allure-report/
# Legacy test directories
e2e-tests/.pytest_cache/
e2e-tests/__pycache__/
e2e-tests/.venv/
e2e-tests/venv/
e2e-tests/*.egg-info/
e2e-tests/results/
e2e-tests/reports/
# ============================================================
# Environment Variables & Secrets
# ============================================================
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
.env.production
.env.*.local
*.env
# Debug & Security
*.pem
*.key
*.cert
*.crt
.auth/
# WorkBuddy 工作记忆目录(工具生成,不入库)
.workbuddy/
# ============================================================
# Database
# ============================================================
*.db
*.db-journal
data.db
data/
# ============================================================
# Uploads & Storage
# ============================================================
uploads/
# ============================================================
# Logs
# ============================================================
logs/
*.log
npm-debug.log*
yarn-debug.log*
pnpm-debug.log*
lerna-debug.log*
deploy_*.log
# ============================================================
# TypeScript
# ============================================================
*.tsbuildinfo
next-env.d.ts
*.d.ts.map
# ============================================================
# IDE & Editors
# ============================================================
.idea/
.vscode/
*.swp
*.swo
*~
*.sublime-workspace
*.sublime-project
*.iml
.project
.classpath
.settings/
*.code-workspace
# ============================================================
# OS Generated Files
# ============================================================
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msix
*.msm
*.msp
*.lnk
# ============================================================
# Runtime & Cache
# ============================================================
pids/
*.pid
*.seed
*.pid.lock
.eslintcache
.node_repl_history
.npm
# ============================================================
# Backup Files
# ============================================================
*.backup
*.bak
*.tmp
*.temp
# ============================================================
# Deployment Platforms
# ============================================================
.vercel/
# ============================================================
# Framework Specific
# ============================================================
# Vite
vite.config.ts.timestamp-*
# Tailwind CSS
*.css.map
# Framer Motion
*.framer-motion.json
# Three.js
*.three.json
# Trae IDE
.trae/
# ============================================================
# Python (if used for scripts/testing)
# ============================================================
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
develop-eggs/
downloads/
eggs/
.eggs/
lib/
lib64/
!src/lib/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
.pytest_cache/
.mypy_cache/
.coverage
htmlcov/
.tox/
.hypothesis/
.coverage.*
*.cover
coverage.xml
.dmypy.json
dmypy.json
.pyre/
.pytype/
cython_debug/
# Python Virtual Environments
venv/
env/
ENV/
env.bak/
venv.bak/
.venv/
virtualenv/
virtualenvs/
# ============================================================
# Project Specific Test Files
# ============================================================
test-email.js
test-screenshot.png
hero-check.png
playwright-test-not-portal.js
heading-hierarchy-report.json
# Test reports
reports/e2e/
reports/performance/
reports/coverage/
reports/mutation/
# Performance audit results
lighthouse-reports/
.lighthouseci/
performance-baseline.json
# Test data exports
test-data-*.json
test-results-*.json
# Stryker mutation testing temp files
.stryker-tmp/
# Pi framework temp files
.pi/
# Agent config (local only)
.agents/settings.local.json
# Additional E2E test artifacts
e2e/blob-report/
e2e/report/
e2e/.auth/
e2e/state/
e2e/storage-state.json
# Test execution artifacts
*.trace
*.trace.zip
trace.zip
network-logs/
# ============================================================
# Task Planning Files
# ============================================================
task_plan.md
progress.md
findings.md
# ============================================================
# IMPORTANT NOTES
# ============================================================
# Visual regression snapshots are committed to version control
# These are in: e2e/visual-snapshots/
# Git will track them because they are not in test-results/ or allure-results/
# AGENTS
AGENTS.md
# dogfood
dogfood-output*/
dogfood-bain/
dogfood-motion-audit/
dogfood-b2-verify/
# 硬编码颜色审计产物(暗黑模式 Phase 2)—— 只提交脚本与报告
dogfood-color-audit/
# UI/UX/UE 审计采集产物(截图 + probes.json,单轮可达 39MB)—— 只提交脚本与报告
dogfood-ui-audit/
# agent & skill artifacts
.nova-loop/
.qoder/
.impeccable/
.superpowers/brainstorm/
sessions/
# test outputs
# NOTE: visual regression baselines are intentionally tracked; see IMPORTANT NOTES above
responsive-test/
visual-test/
tests/screenshots/
# reference designs
novalon-accenture-redesign/
/src/generated/prisma