Revise design and UI components for AI video admin interface

Updated DESIGN.md to reflect a new editorial design approach with a navy palette and refined typography. Enhanced global styles in globals.css, including new color tokens and layout adjustments. Refactored components in AppShell, Sidebar, and Topbar for improved consistency and theming. Introduced a ThemeToggle component for user theme preferences and updated various pages to utilize new styles and components, ensuring a cohesive user experience across the application.
This commit is contained in:
Xin Wang
2026-06-05 13:48:42 +08:00
parent 9952e08e49
commit 571c67526f
17 changed files with 809 additions and 583 deletions

View File

@@ -9,7 +9,8 @@
--color-foreground: var(--foreground);
--font-sans: var(--font-sans);
--font-mono: var(--font-geist-mono);
--font-heading: var(--font-sans);
--font-display: var(--font-display);
--font-heading: var(--font-display);
--color-sidebar-ring: var(--sidebar-ring);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
@@ -39,6 +40,24 @@
--color-popover: var(--popover);
--color-card-foreground: var(--card-foreground);
--color-card: var(--card);
/* Editorial (ElevenLabs-derived) tokens — navy palette */
--color-canvas-soft: var(--canvas-soft);
--color-surface-strong: var(--surface-strong);
--color-ink: var(--ink);
--color-body: var(--body-text);
--color-muted-soft: var(--muted-soft);
--color-hairline: var(--hairline);
--color-hairline-soft: var(--hairline-soft);
--color-hairline-strong: var(--hairline-strong);
--color-on-primary: var(--on-primary);
--color-success: var(--success);
--color-gradient-mint: var(--gradient-mint);
--color-gradient-peach: var(--gradient-peach);
--color-gradient-lavender: var(--gradient-lavender);
--color-gradient-sky: var(--gradient-sky);
--color-gradient-rose: var(--gradient-rose);
--radius-sm: calc(var(--radius) * 0.6);
--radius-md: calc(var(--radius) * 0.8);
--radius-lg: var(--radius);
@@ -48,73 +67,114 @@
--radius-4xl: calc(var(--radius) * 2.6);
}
/* ---------- Light navy (editorial off-white, navy ink) ---------- */
:root {
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
--card: oklch(1 0 0);
--card-foreground: oklch(0.145 0 0);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.145 0 0);
--primary: oklch(0.55 0.22 255);
--primary-foreground: oklch(0.985 0 0);
--secondary: oklch(0.97 0 0);
--secondary-foreground: oklch(0.205 0 0);
--muted: oklch(0.97 0 0);
--muted-foreground: oklch(0.556 0 0);
--accent: oklch(0.97 0 0);
--accent-foreground: oklch(0.205 0 0);
--destructive: oklch(0.577 0.245 27.325);
--border: oklch(0.922 0 0);
--input: oklch(0.922 0 0);
--ring: oklch(0.708 0 0);
--chart-1: oklch(0.87 0 0);
--chart-2: oklch(0.556 0 0);
--chart-3: oklch(0.439 0 0);
--chart-4: oklch(0.371 0 0);
--chart-5: oklch(0.269 0 0);
--radius: 0.625rem;
--sidebar: oklch(0.985 0 0);
--sidebar-foreground: oklch(0.145 0 0);
--sidebar-primary: oklch(0.205 0 0);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.97 0 0);
--sidebar-accent-foreground: oklch(0.205 0 0);
--sidebar-border: oklch(0.922 0 0);
--sidebar-ring: oklch(0.708 0 0);
--background: #f3f5fb;
--foreground: #0f1b33;
--card: #ffffff;
--card-foreground: #0f1b33;
--popover: #ffffff;
--popover-foreground: #0f1b33;
--primary: #1b2741;
--primary-foreground: #ffffff;
--secondary: #e9edf7;
--secondary-foreground: #1b2741;
--muted: #eef1f8;
--muted-foreground: #5d6b86;
--accent: #e9edf7;
--accent-foreground: #1b2741;
--destructive: #dc2626;
--border: #dfe4f0;
--input: #cbd3e4;
--ring: #94a0bd;
--chart-1: #1b2741;
--chart-2: #3a4a6b;
--chart-3: #5d6b86;
--chart-4: #94a0bd;
--chart-5: #c8d0e2;
--radius: 0.75rem;
/* Editorial tokens */
--canvas-soft: #f9fafd;
--surface-strong: #e9edf7;
--ink: #0c1426;
--body-text: #44516c;
--muted-soft: #94a0bd;
--hairline: #e3e7f1;
--hairline-soft: #eef1f8;
--hairline-strong: #cbd3e4;
--on-primary: #ffffff;
--success: #16a34a;
/* Atmospheric pastel orbs (cool-leaning for navy) */
--gradient-mint: #a7e5d3;
--gradient-peach: #f4c5a8;
--gradient-lavender: #c8b8e0;
--gradient-sky: #a8c8e8;
--gradient-rose: #e8b8c4;
--sidebar: #ffffff;
--sidebar-foreground: #0f1b33;
--sidebar-primary: #1b2741;
--sidebar-primary-foreground: #ffffff;
--sidebar-accent: #eef1f8;
--sidebar-accent-foreground: #1b2741;
--sidebar-border: #e3e7f1;
--sidebar-ring: #94a0bd;
}
/* ---------- Dark navy (deep navy canvas, off-white ink) ---------- */
.dark {
--background: oklch(0.145 0 0);
--foreground: oklch(0.985 0 0);
--card: oklch(0.205 0 0);
--card-foreground: oklch(0.985 0 0);
--popover: oklch(0.205 0 0);
--popover-foreground: oklch(0.985 0 0);
--primary: oklch(0.6 0.22 255);
--primary-foreground: oklch(0.985 0 0);
--secondary: oklch(0.269 0 0);
--secondary-foreground: oklch(0.985 0 0);
--muted: oklch(0.269 0 0);
--muted-foreground: oklch(0.708 0 0);
--accent: oklch(0.269 0 0);
--accent-foreground: oklch(0.985 0 0);
--destructive: oklch(0.704 0.191 22.216);
--border: oklch(1 0 0 / 10%);
--input: oklch(1 0 0 / 15%);
--ring: oklch(0.556 0 0);
--chart-1: oklch(0.87 0 0);
--chart-2: oklch(0.556 0 0);
--chart-3: oklch(0.439 0 0);
--chart-4: oklch(0.371 0 0);
--chart-5: oklch(0.269 0 0);
--sidebar: oklch(0.205 0 0);
--sidebar-foreground: oklch(0.985 0 0);
--sidebar-primary: oklch(0.488 0.243 264.376);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.269 0 0);
--sidebar-accent-foreground: oklch(0.985 0 0);
--sidebar-border: oklch(1 0 0 / 10%);
--sidebar-ring: oklch(0.556 0 0);
--background: #070b16;
--foreground: #e8edf9;
--card: #0e1626;
--card-foreground: #e8edf9;
--popover: #0e1626;
--popover-foreground: #e8edf9;
--primary: #e8edf9;
--primary-foreground: #0c1426;
--secondary: #18233a;
--secondary-foreground: #e8edf9;
--muted: #141d30;
--muted-foreground: #93a0bb;
--accent: #18233a;
--accent-foreground: #e8edf9;
--destructive: #f87171;
--border: #1b2740;
--input: #283450;
--ring: #4a5876;
--chart-1: #e8edf9;
--chart-2: #c8d0e2;
--chart-3: #93a0bb;
--chart-4: #5d6b86;
--chart-5: #2a3654;
/* Editorial tokens */
--canvas-soft: #0b1322;
--surface-strong: #18233a;
--ink: #f1f5ff;
--body-text: #a6b2cb;
--muted-soft: #6c7a96;
--hairline: #1b2740;
--hairline-soft: #141d30;
--hairline-strong: #283450;
--on-primary: #0c1426;
--success: #4ade80;
--gradient-mint: #5fae9b;
--gradient-peach: #c08a6b;
--gradient-lavender: #8a78ad;
--gradient-sky: #5f86b8;
--gradient-rose: #b07d8c;
--sidebar: #0a111e;
--sidebar-foreground: #e8edf9;
--sidebar-primary: #e8edf9;
--sidebar-primary-foreground: #0c1426;
--sidebar-accent: #18233a;
--sidebar-accent-foreground: #e8edf9;
--sidebar-border: #1b2740;
--sidebar-ring: #4a5876;
}
@layer base {
@@ -123,8 +183,52 @@
}
body {
@apply bg-background text-foreground;
letter-spacing: 0.01em;
}
html {
@apply font-sans;
}
}
}
@layer components {
/* Waldenburg Light substitute — EB Garamond at weight 300. The editorial
display signature: serif, light, tightly tracked. Never bold. */
.font-display {
font-family: var(--font-display), "Times New Roman", serif;
font-weight: 300;
letter-spacing: -0.01em;
}
.display-mega {
font-size: clamp(2.5rem, 5vw, 4rem);
line-height: 1.05;
letter-spacing: -0.03em;
}
.display-xl {
font-size: clamp(2rem, 4vw, 3rem);
line-height: 1.08;
letter-spacing: -0.02em;
}
.display-lg {
font-size: 2.25rem;
line-height: 1.17;
letter-spacing: -0.01em;
}
.display-md {
font-size: 2rem;
line-height: 1.13;
letter-spacing: -0.01em;
}
.display-sm {
font-size: 1.5rem;
line-height: 1.2;
}
/* Caption label — uppercase, tracked, the editorial section marker */
.caption-label {
font-size: 0.75rem;
font-weight: 600;
line-height: 1.4;
letter-spacing: 0.08em;
text-transform: uppercase;
}
}

View File

@@ -1,13 +1,16 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono, Inter } from "next/font/google";
import { Geist_Mono, Inter, Cormorant_Garamond } from "next/font/google";
import "./globals.css";
import { cn } from "@/lib/utils";
const inter = Inter({subsets:['latin'],variable:'--font-sans'});
const inter = Inter({ subsets: ["latin"], variable: "--font-sans" });
const geistSans = Geist({
variable: "--font-geist-sans",
// Waldenburg Light is licensed; Cormorant Garamond at weight 300 is a close
// open-source substitute for the light editorial display voice.
const display = Cormorant_Garamond({
subsets: ["latin"],
weight: ["300", "400", "500"],
variable: "--font-display",
});
const geistMono = Geist_Mono({
@@ -16,10 +19,13 @@ const geistMono = Geist_Mono({
});
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
title: "AI 视频助手 · 管理台",
description: "创建、配置、测试并发布 AI 视频助手",
};
// Apply the persisted theme before paint to avoid a flash. Defaults to dark navy.
const themeScript = `(function(){try{var t=localStorage.getItem('theme');if(t==='light'){document.documentElement.classList.remove('dark')}else{document.documentElement.classList.add('dark')}}catch(e){document.documentElement.classList.add('dark')}})();`;
export default function RootLayout({
children,
}: Readonly<{
@@ -27,9 +33,21 @@ export default function RootLayout({
}>) {
return (
<html
lang="en"
className={cn("h-full", "antialiased", geistSans.variable, geistMono.variable, "font-sans", inter.variable)}
lang="zh-CN"
className={cn(
"h-full",
"antialiased",
"dark",
geistMono.variable,
"font-sans",
inter.variable,
display.variable,
)}
suppressHydrationWarning
>
<head>
<script dangerouslySetInnerHTML={{ __html: themeScript }} />
</head>
<body className="min-h-full flex flex-col">{children}</body>
</html>
);