diff --git a/docs/superpowers/plans/2026-05-23-website-redesign.md b/docs/superpowers/plans/2026-05-23-website-redesign.md new file mode 100644 index 0000000..24a5efe --- /dev/null +++ b/docs/superpowers/plans/2026-05-23-website-redesign.md @@ -0,0 +1,2470 @@ +# DAL Website Redesign Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Transform dalcode-website from a single-product Webflow-template site into a product-matrix platform site for DAL Code, DAL CLI, DAL Office, and DeepAILab API Platform. + +**Architecture:** Replace webflow.css (11K lines) with Tailwind utility classes. Keep GSAP for scroll animations, remove Lottie. Remove next-themes (dark-only). Retain next-intl for zh-CN/en bilingual support. All new content goes through i18n message files. + +**Tech Stack:** Next.js 16.2.4, React 19, Tailwind CSS 4, GSAP 3, next-intl 4, React Hook Form + Zod + +**Key constraint:** All copy must be smart, polished, and sophisticated — not generic/cheap-sounding. The user explicitly said "文案一定要智能灵活,不要太 low". + +**AGENTS.md warning:** Next.js 16 may have breaking API changes. Before writing any code, check `node_modules/next/dist/docs/` for current conventions. Key findings from review: `page.tsx`, `layout.tsx`, `not-found.tsx` conventions unchanged. `middleware` is deprecated in favor of `proxy`. + +--- + +## File Structure + +### New files + +``` +app/ +├── globals.css (REWRITE — pure Tailwind, no webflow refs) +├── code/page.tsx (DAL Code product page) +├── cli/page.tsx (DAL CLI product page) +├── office/page.tsx (DAL Office page) +├── platform/page.tsx (API Platform page) +├── pricing/page.tsx (Unified pricing page) + +components/ +├── Header.tsx (REWRITE — new nav with Products dropdown) +├── Footer.tsx (REWRITE — 4-column layout) +├── GsapAnimations.tsx (MODIFY — update selectors for new sections) +├── ScrollReveal.tsx (NEW — reusable scroll-reveal wrapper) +├── home/ +│ ├── HeroSection.tsx (REWRITE) +│ ├── ProductEcosystem.tsx (NEW — 2×2 product cards) +│ ├── WorkflowSteps.tsx (NEW — 3-step Intent/Build/Ship) +│ ├── FeatureGrid.tsx (NEW — 8-feature grid) +│ ├── EcosystemSection.tsx (NEW — DeepAILab platform) +│ ├── BottomCta.tsx (NEW — bottom CTA) +│ ├── FaqSection.tsx (NEW — accordion FAQ) +│ └── index.ts (REWRITE — export new components) + +lib/ +├── site-content.ts (REWRITE — new data structures) +``` + +### Files to delete + +``` +app/webflow.css (11K lines, replaced by Tailwind) +components/ThemeToggle.tsx (no more theme switching) +components/LottiePlayer.tsx (removing Lottie) +components/home/IntegrationsSection.tsx (replaced by ProductEcosystem) +components/home/PrinciplesSection.tsx (replaced by WorkflowSteps) +components/home/BlogPreviewSection.tsx (removed from homepage) +components/home/CtaSection.tsx (replaced by BottomCta) +``` + +### Message files to rewrite + +``` +messages/zh-CN.json (full rewrite with new content) +messages/en.json (full rewrite with new content) +``` + +--- + +## Task 1: Foundation — Remove webflow.css, set up dark Tailwind base + +**Files:** +- Delete: `app/webflow.css` +- Rewrite: `app/globals.css` +- Modify: `app/layout.tsx` +- Delete: `components/ThemeToggle.tsx` +- Delete: `components/LottiePlayer.tsx` + +- [ ] **Step 1: Create the new globals.css** + +Replace the entire `app/globals.css` with a Tailwind-first dark theme foundation: + +```css +@import "tailwindcss"; + +@theme { + --color-bg-primary: #0a0a0a; + --color-bg-secondary: #111111; + --color-bg-card: #161616; + --color-bg-card-hover: #1a1a1a; + --color-border: #222222; + --color-border-hover: #333333; + --color-text-primary: #f0f0f0; + --color-text-secondary: #a0a0a0; + --color-text-muted: #666666; + --color-accent: #6366f1; + --color-accent-hover: #818cf8; + --color-accent-glow: rgba(99, 102, 241, 0.15); + --font-sans: var(--font-inter), ui-sans-serif, system-ui, sans-serif; + --font-display: var(--font-inter-tight), var(--font-sans); +} + +html { + scroll-behavior: smooth; +} + +body { + @apply bg-bg-primary text-text-primary antialiased; + font-family: var(--font-sans); +} + +::selection { + @apply bg-accent/30 text-text-primary; +} + +/* Scrollbar */ +::-webkit-scrollbar { width: 6px; } +::-webkit-scrollbar-track { background: transparent; } +::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; } +::-webkit-scrollbar-thumb:hover { background: var(--color-border-hover); } + +/* Shared animation classes used by GSAP */ +.reveal-up { + opacity: 0; + transform: translateY(40px); +} + +.reveal-visible { + opacity: 1; + transform: translateY(0); + transition: opacity 0.6s ease, transform 0.6s ease; +} + +/* Glow effect for cards */ +.card-glow { + position: relative; +} +.card-glow::before { + content: ''; + position: absolute; + inset: 0; + border-radius: inherit; + padding: 1px; + background: linear-gradient(135deg, transparent, var(--color-accent-glow), transparent); + mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); + mask-composite: exclude; + opacity: 0; + transition: opacity 0.3s ease; +} +.card-glow:hover::before { + opacity: 1; +} + +/* Stagger children animation delay */ +.stagger-children > * { + opacity: 0; + transform: translateY(20px); +} +``` + +- [ ] **Step 2: Update layout.tsx — remove webflow.css, ThemeProvider, Lottie** + +Replace `app/layout.tsx`: + +```tsx +import type { Metadata } from "next" +import { Inter, Inter_Tight } from "next/font/google" +import { NextIntlClientProvider } from "next-intl" +import { getLocale, getMessages } from "next-intl/server" +import Header from "@/components/Header" +import Footer from "@/components/Footer" +import GsapAnimations from "@/components/GsapAnimations" +import { SITE_BRAND, SITE_DESCRIPTION, SITE_NAME } from "@/lib/site-content" +import "./globals.css" + +const inter = Inter({ + subsets: ["latin"], + weight: ["400", "500", "600", "700"], + variable: "--font-inter", + display: "swap", +}) + +const interTight = Inter_Tight({ + subsets: ["latin"], + weight: ["400", "500", "600", "700"], + variable: "--font-inter-tight", + display: "swap", +}) + +const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? "http://localhost:3000" + +export const metadata: Metadata = { + metadataBase: new URL(SITE_URL), + title: { + default: SITE_BRAND, + template: `%s | ${SITE_NAME}`, + }, + description: SITE_DESCRIPTION, + icons: { + icon: "/favicon.ico", + apple: "/assets/dalcode-app-icon-192.png", + }, + openGraph: { + type: "website", + siteName: SITE_BRAND, + title: SITE_BRAND, + description: SITE_DESCRIPTION, + }, +} + +export default async function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode +}>) { + const locale = await getLocale() + const messages = await getMessages() + + return ( + + + +
+
{children}
+