Files
InnerOS/src/app/globals.css
T
jackyu66gitandClaude Opus 4.6 00db3f6c96 feat: custom JWT auth + i18n with Chinese default
Replace Clerk with self-contained JWT auth (bcryptjs + jose), remove all
external auth dependencies. Add full i18n system with Chinese as default
language and English toggle — React Context + JSON dictionaries, no
external i18n library.

Auth:
- Add passwordHash to User model, generate JWT secret
- Create /api/auth/register, login, logout, me endpoints
- Rewrite proxy.ts middleware for custom session validation
- Add AuthProvider + useAuth hook, sign-in/sign-up pages
- Wire auth into layout and all API routes

i18n:
- React Context I18nProvider with localStorage + cookie persistence
- dictionaries/zh.ts (default) and dictionaries/en.ts
- LanguageSwitcher component, server-side createServerT() utility
- CJK font stack via [lang="zh"] CSS selector
- HTML lang attribute synced on language change
- All pages, components, TabBar, StageBadge translated
- Engine fallback strings (reflection-analyzer, summary-generator)
- API routes pass locale from cookie to engines

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-20 22:47:14 +08:00

57 lines
1.3 KiB
CSS

@import "tailwindcss";
@theme inline {
--color-cream: #FAF7F2;
--color-sand: #F3EFE8;
--color-stone: #E6E0D4;
--color-amber: #C8834A;
--color-sage: #7A9A8B;
--color-ink: #2C2416;
--color-muted: #6B5E4A;
--color-faded: #9B8E7A;
--color-success: #7A9A8B;
--color-warning: #C8834A;
--color-error: #C45A4A;
--color-info: #5A8AB5;
--font-display: var(--font-fraunces), Georgia, serif;
--font-body: var(--font-dm-sans), system-ui, sans-serif;
}
:root {
--background: #FAF7F2;
--foreground: #2C2416;
--surface: #F3EFE8;
--border: #E6E0D4;
}
@media (prefers-color-scheme: dark) {
:root {
--background: #1E1A14;
--foreground: #F3EFE8;
--surface: #292418;
--border: #3D3528;
--color-muted: #B8A892;
--color-faded: #8A7D6B;
}
}
body {
background: var(--background);
color: var(--foreground);
font-family: var(--font-body);
font-size: 16px;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* CJK font stack — wider characters read better at slightly smaller sizes */
[lang="zh"] {
--font-display: "Noto Serif SC", "Source Han Serif SC", var(--font-fraunces), Georgia, serif;
--font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", var(--font-dm-sans), system-ui, sans-serif;
}
[lang="zh"] body {
font-size: 15px;
}