Skip to content

Redesign homepage based on shadcn and fumadocs specifications#39

Merged
huangyiirene merged 4 commits intomainfrom
copilot/redesign-homepage-based-on-shacn-fumadocs
Jan 20, 2026
Merged

Redesign homepage based on shadcn and fumadocs specifications#39
huangyiirene merged 4 commits intomainfrom
copilot/redesign-homepage-based-on-shacn-fumadocs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 20, 2026

Homepage Redesign - Based on shadcn & fumadocs Specifications

Goal

重新开发首页,基于 shadcn 和 fumadocs 规范 (Redevelop homepage based on shadcn and fumadocs specifications)

Implementation Checklist

  • Setup Phase

    • Install shadcn/ui dependencies (class-variance-authority, clsx, tailwind-merge)
    • Create components directory structure
    • Set up cn utility function for className merging
    • Update tailwind.config.js with shadcn theme configuration
  • Component Development

    • Create reusable shadcn-style components (Button, Card, Badge)
    • Implement enhanced hero section with modern animations
    • Redesign feature cards with better visual hierarchy
    • Improve code preview component with syntax highlighting
    • Enhance persona cards with hover effects
  • Homepage Enhancement

    • Update hero section with improved typography and spacing
    • Add gradient backgrounds and modern visual effects
    • Implement responsive grid layouts
    • Add smooth animations and transitions
    • Improve color scheme alignment with fumadocs theme
  • Testing & Validation

    • Test responsive design on different screen sizes
    • Verify fumadocs integration
    • Ensure i18n translations work correctly (EN/CN)
    • Production build successful
    • TypeScript type checking passed
    • Code review feedback addressed
    • Fix light mode code visibility issues
    • Take screenshots of new design

Screenshots

Desktop View (English)

Before:

After (Dark Mode):

After (Light Mode):

Mobile View (375px)

Chinese Version (中文)

Key Improvements

Modern shadcn/ui Component System

  • Implemented reusable Button, Card, and Badge components
  • Used class-variance-authority for flexible component variants
  • Added cn utility for clean className merging

🎨 Enhanced Visual Design

  • Better spacing and typography hierarchy
  • Improved color scheme with fumadocs theme variables
  • Gradient backgrounds and modern visual effects
  • Enhanced code preview with theme-aware syntax highlighting

🚀 Smooth Animations & Interactions

  • Fade-in and slide animations on page load
  • Hover effects with scale transforms
  • Smooth transitions on all interactive elements
  • Pulsing badge indicator

📱 Responsive Design

  • Mobile-first approach with breakpoints
  • Flexible grid layouts (1, 2, 3 columns)
  • Stack layout on mobile devices
  • Optimized typography for different screen sizes

🌐 i18n Support

  • Full support for English and Chinese
  • All components respect language context
  • Consistent design across languages

🎯 Fumadocs Best Practices

  • Uses fumadocs theme variables (--fd-*)
  • Integrates seamlessly with fumadocs-ui layouts
  • Follows fumadocs design patterns
  • Compatible with fumadocs navigation and search

🌓 Light/Dark Mode Support

  • Theme-aware syntax highlighting in code previews
  • Proper contrast in both light and dark modes
  • Colors adapt automatically to theme changes
  • Fixed light mode code visibility with theme-responsive color values

Technical Details

New Dependencies:

  • class-variance-authority - Component variant management
  • clsx - Conditional className utilities
  • tailwind-merge - Tailwind class merging

New Components:

  • components/ui/button.tsx - Reusable button component
  • components/ui/card.tsx - Card component system
  • components/ui/badge.tsx - Badge component
  • components/feature-card.tsx - Feature showcase cards
  • components/persona-card.tsx - Persona profile cards
  • components/code-preview.tsx - Enhanced code preview with theme-aware colors
  • components/hero-section.tsx - Hero section component
  • lib/utils.ts - Utility functions

Updated Files:

  • app/[lang]/page.tsx - Refactored to use new components
  • tailwind.config.js - Enhanced with shadcn theme config
  • app/global.css - Added CSS variables and utilities
Original prompt

基于shacn和fumadocs规范,重新开发首页


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
spec Ready Ready Preview, Comment Jan 20, 2026 9:37am

Request Review

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
@hotlong
Copy link
Copy Markdown
Contributor

hotlong commented Jan 20, 2026

@copilot 浅色模式下,首页代码看不清

@huangyiirene
Copy link
Copy Markdown
Collaborator

@copilot 继续

…olors

Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 20, 2026

@copilot 继续

Fixed in commit 98da8d9. Updated code preview colors to use theme-aware Tailwind classes (e.g., text-purple-600 dark:text-purple-400) for better visibility in both light and dark modes.

Light Mode (Fixed):
Light Mode Code Preview

Dark Mode:
Dark Mode Code Preview

@huangyiirene
Copy link
Copy Markdown
Collaborator

@copilot 继续

Fixed in commit 98da8d9. Updated code preview colors to use theme-aware Tailwind classes (e.g., text-purple-600 dark:text-purple-400) for better visibility in both light and dark modes.

Light Mode (Fixed):
Light Mode Code Preview

Dark Mode:
Dark Mode Code Preview

@copilot 你截图的浅色模式实际上是深色效果呀,是不是哪里的代码出问题了?

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 20, 2026

@copilot 继续
...

抱歉截图有误!这是正确的对比:

Dark Mode(深色模式):
Dark Mode

Light Mode(浅色模式 - 已修复):
Light Mode Fixed

代码预览在浅色模式下现在可以清晰看到了,使用了主题感知的颜色类(如 text-purple-600 dark:text-purple-400)。

Copilot AI changed the title [WIP] Redesign homepage based on shacn and fumadocs specifications Redesign homepage based on shadcn and fumadocs specifications Jan 20, 2026
@huangyiirene huangyiirene marked this pull request as ready for review January 20, 2026 10:03
@github-actions github-actions bot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file labels Jan 20, 2026
@huangyiirene huangyiirene merged commit f6eb79c into main Jan 20, 2026
11 checks passed
@@ -0,0 +1,40 @@
import Link from 'next/link';
import { Card, CardHeader, CardTitle, CardDescription } from '@/components/ui/card';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note documentation

Unused imports CardDescription, CardHeader, CardTitle.

Copilot Autofix

AI 3 months ago

In general, unused imports should be removed to keep the codebase clean and avoid confusion about which components are actually used. This also helps bundlers/tree-shakers produce smaller bundles.

Specifically for apps/docs/components/feature-card.tsx, we should edit the import from @/components/ui/card so that it only imports Card, since CardHeader, CardTitle, and CardDescription are not used anywhere in this file. No other code changes are needed because the JSX already uses native h3/p tags instead of those components. The change is localized to line 2 of this file: replace the destructuring import of four names with a single import of Card.

No new methods, imports, or definitions are required beyond that; we’re only simplifying an existing import.

Suggested changeset 1
apps/docs/components/feature-card.tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/apps/docs/components/feature-card.tsx b/apps/docs/components/feature-card.tsx
--- a/apps/docs/components/feature-card.tsx
+++ b/apps/docs/components/feature-card.tsx
@@ -1,5 +1,5 @@
 import Link from 'next/link';
-import { Card, CardHeader, CardTitle, CardDescription } from '@/components/ui/card';
+import { Card } from '@/components/ui/card';
 import { cn } from '@/lib/utils';
 
 interface FeatureCardProps {
EOF
@@ -1,5 +1,5 @@
import Link from 'next/link';
import { Card, CardHeader, CardTitle, CardDescription } from '@/components/ui/card';
import { Card } from '@/components/ui/card';
import { cn } from '@/lib/utils';

interface FeatureCardProps {
Copilot is powered by AI and may make mistakes. Always verify output.
@@ -0,0 +1,69 @@
import Link from 'next/link';
import { Badge } from '@/components/ui/badge';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note documentation

Unused import Badge.

Copilot Autofix

AI 3 months ago

In general, unused imports should be removed to keep the code clean and avoid confusion. Since the Badge component is not used anywhere in HeroSection, the simplest and safest fix is to delete the import line for Badge.

Concretely, in apps/docs/components/hero-section.tsx, remove line 2 (import { Badge } from '@/components/ui/badge';). No other changes are needed: no additional imports, methods, or definitions are required, and existing functionality will remain unchanged because Badge was never referenced.

Suggested changeset 1
apps/docs/components/hero-section.tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/apps/docs/components/hero-section.tsx b/apps/docs/components/hero-section.tsx
--- a/apps/docs/components/hero-section.tsx
+++ b/apps/docs/components/hero-section.tsx
@@ -1,5 +1,4 @@
 import Link from 'next/link';
-import { Badge } from '@/components/ui/badge';
 import { cn } from '@/lib/utils';
 
 interface HeroSectionProps {
EOF
@@ -1,5 +1,4 @@
import Link from 'next/link';
import { Badge } from '@/components/ui/badge';
import { cn } from '@/lib/utils';

interface HeroSectionProps {
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants