-
Notifications
You must be signed in to change notification settings - Fork 1
Redesign homepage based on shadcn and fumadocs specifications #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
huangyiirene
merged 4 commits into
main
from
copilot/redesign-homepage-based-on-shacn-fumadocs
Jan 20, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
ea01f0d
Initial plan
Copilot 113254b
feat: Redesign homepage with shadcn/ui and fumadocs best practices
Copilot be68e0b
fix: Correct CardTitle ref type to HTMLHeadingElement
Copilot 98da8d9
fix: Improve code preview visibility in light mode with theme-aware c…
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,14 @@ | ||
| @import "tailwindcss"; | ||
| @import "fumadocs-ui/style.css"; | ||
|
|
||
| @layer base { | ||
| :root { | ||
| --radius: 0.5rem; | ||
| } | ||
| } | ||
|
|
||
| @layer utilities { | ||
| .text-balance { | ||
| text-wrap: balance; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| import { cn } from '@/lib/utils'; | ||
|
|
||
| interface CodePreviewProps { | ||
| filename: string; | ||
| className?: string; | ||
| } | ||
|
|
||
| export function CodePreview({ filename, className }: CodePreviewProps) { | ||
| return ( | ||
| <div className={cn( | ||
| "relative mx-auto mt-12 w-full max-w-3xl transform rounded-xl bg-gradient-to-br from-border/50 to-border/10 p-[2px] opacity-90 transition-all hover:scale-[1.01] hover:opacity-100 sm:mt-16", | ||
| className | ||
| )}> | ||
| <div className="overflow-hidden rounded-xl border border-border bg-card shadow-2xl"> | ||
| {/* Window Controls */} | ||
| <div className="flex items-center gap-2 border-b border-border bg-muted/50 px-4 py-3"> | ||
| <div className="h-3 w-3 rounded-full bg-red-500/80 transition-colors hover:bg-red-500" /> | ||
| <div className="h-3 w-3 rounded-full bg-yellow-500/80 transition-colors hover:bg-yellow-500" /> | ||
| <div className="h-3 w-3 rounded-full bg-green-500/80 transition-colors hover:bg-green-500" /> | ||
| <div className="ml-2 text-xs font-medium text-muted-foreground font-mono"> | ||
| {filename} | ||
| </div> | ||
| </div> | ||
|
|
||
| {/* Code Content */} | ||
| <div className="overflow-x-auto p-6 text-left bg-gradient-to-br from-card to-muted/20"> | ||
| <pre className="font-mono text-sm leading-7"> | ||
| <code> | ||
| <span className="text-purple-600 dark:text-purple-400 font-semibold">import</span>{' '} | ||
| <span className="text-foreground">{'{'}</span>{' '} | ||
| <span className="text-amber-600 dark:text-yellow-300">ObjectProtocol</span>{' '} | ||
| <span className="text-foreground">{'}'}</span>{' '} | ||
| <span className="text-purple-600 dark:text-purple-400 font-semibold">from</span>{' '} | ||
| <span className="text-green-600 dark:text-green-300">'@objectstack/spec'</span>; | ||
| <br/><br/> | ||
| <span className="text-purple-600 dark:text-purple-400 font-semibold">export const</span>{' '} | ||
| <span className="text-blue-600 dark:text-blue-300">Issue</span>{' '} | ||
| <span className="text-purple-600 dark:text-purple-400">=</span>{' '} | ||
| <span className="text-amber-600 dark:text-yellow-300">ObjectProtocol</span>. | ||
| <span className="text-blue-600 dark:text-blue-300">define</span> | ||
| <span className="text-foreground">(</span> | ||
| <span className="text-foreground">{'{'}</span> | ||
| <br/> | ||
| <span className="text-cyan-600 dark:text-sky-300">code</span>: <span className="text-green-600 dark:text-green-300">'issue_tracker'</span>, | ||
| <br/> | ||
| <span className="text-cyan-600 dark:text-sky-300">fields</span>: <span className="text-foreground">{'{'}</span> | ||
| <br/> | ||
| <span className="text-cyan-600 dark:text-sky-300">summary</span>: <span className="text-amber-600 dark:text-yellow-300">Field</span>.<span className="text-blue-600 dark:text-blue-300">text</span>(<span className="text-foreground">{'{'}</span> <span className="text-cyan-600 dark:text-sky-300">required</span>: <span className="text-red-600 dark:text-red-300">true</span> <span className="text-foreground">{'}'}</span>), | ||
| <br/> | ||
| <span className="text-cyan-600 dark:text-sky-300">priority</span>: <span className="text-amber-600 dark:text-yellow-300">Field</span>.<span className="text-blue-600 dark:text-blue-300">select</span>([<span className="text-green-600 dark:text-green-300">'P0'</span>, <span className="text-green-600 dark:text-green-300">'P1'</span>, <span className="text-green-600 dark:text-green-300">'P2'</span>]), | ||
| <br/> | ||
| <span className="text-cyan-600 dark:text-sky-300">assignee</span>: <span className="text-amber-600 dark:text-yellow-300">Field</span>.<span className="text-blue-600 dark:text-blue-300">lookup</span>(<span className="text-green-600 dark:text-green-300">'users'</span>) | ||
| <br/> | ||
| <span className="text-foreground">{'}'}</span>, | ||
| <br/> | ||
| <span className="text-cyan-600 dark:text-sky-300">policy</span>: <span className="text-foreground">{'{'}</span>{' '} | ||
| <span className="text-cyan-600 dark:text-sky-300">audit</span>: <span className="text-red-600 dark:text-red-300">true</span>, {' '} | ||
| <span className="text-cyan-600 dark:text-sky-300">api_access</span>: <span className="text-green-600 dark:text-green-300">'public'</span>{' '} | ||
| <span className="text-foreground">{'}'}</span> | ||
| <br/> | ||
| <span className="text-foreground">{'}'}</span>); | ||
| </code> | ||
| </pre> | ||
| </div> | ||
| </div> | ||
|
|
||
| {/* Glow Effect */} | ||
| <div className="absolute -inset-4 -z-10 bg-primary/20 blur-3xl opacity-30 rounded-[50%]" /> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| import Link from 'next/link'; | ||
| import { Card, CardHeader, CardTitle, CardDescription } from '@/components/ui/card'; | ||
| import { cn } from '@/lib/utils'; | ||
|
|
||
| interface FeatureCardProps { | ||
| icon: React.ReactNode; | ||
| title: string; | ||
| description: string; | ||
| href?: string; | ||
| className?: string; | ||
| } | ||
|
|
||
| export function FeatureCard({ icon, title, description, href, className }: FeatureCardProps) { | ||
| const CardContent = ( | ||
| <Card className={cn( | ||
| "group relative h-full p-6 hover:border-primary/20 hover:shadow-md hover:shadow-primary/5 cursor-pointer transition-all duration-300", | ||
| className | ||
| )}> | ||
| <div className="mb-4 inline-flex items-center justify-center rounded-lg bg-primary/10 p-3 text-primary transition-all duration-300 group-hover:bg-primary/20 group-hover:scale-110"> | ||
| {icon} | ||
| </div> | ||
| <h3 className="mb-2 text-lg font-semibold text-card-foreground group-hover:text-primary transition-colors"> | ||
| {title} | ||
| </h3> | ||
| <p className="text-sm text-foreground/70 leading-relaxed"> | ||
| {description} | ||
| </p> | ||
| </Card> | ||
| ); | ||
|
|
||
| if (href) { | ||
| return ( | ||
| <Link href={href} className="block h-full"> | ||
| {CardContent} | ||
| </Link> | ||
| ); | ||
| } | ||
|
|
||
| return CardContent; | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note documentation
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/cardso that it only importsCard, sinceCardHeader,CardTitle, andCardDescriptionare not used anywhere in this file. No other code changes are needed because the JSX already uses nativeh3/ptags 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 ofCard.No new methods, imports, or definitions are required beyond that; we’re only simplifying an existing import.