diff --git a/CLAUDE.md b/CLAUDE.md index c65eca3..d294808 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -44,6 +44,8 @@ npx shadcn@latest view button card # Preview code before installing npx shadcn@latest add # Add component to project npx shadcn@latest add button --overwrite # Overwrite existing component npx shadcn@latest add @v0/ # Add from v0.dev registry +npx shadcn@latest diff # Check for upstream registry updates +npx shadcn@latest --help # CLI help ``` ## Coding Practices diff --git a/app/(root)/layout.tsx b/app/(root)/layout.tsx index f812917..64758b4 100644 --- a/app/(root)/layout.tsx +++ b/app/(root)/layout.tsx @@ -1,35 +1,36 @@ import { cookies } from "next/headers"; -import { AppSidebar } from "@/components/app-sidebar"; -import { ContentTopBar } from "@/components/navigation/content-top-bar"; -import { MobileHeader } from "@/components/navigation/mobile-header"; +import { DesktopTopBar } from "@/components/navigation/desktop-top-bar"; +import { LeftSidebar } from "@/components/navigation/left-sidebar"; +import { MobileTopBar } from "@/components/navigation/mobile-top-bar"; import { SidebarProvider } from "@/components/ui/sidebar"; import { - CONTENT_HORIZONTAL_PADDING, cn, - MOBILE_HEADER_TOP_OFFSET, + LAYOUT_HORIZONTAL_PADDING, + MOBILE_TOP_BAR_OFFSET, } from "@/lib/utils"; const RootLayout = async ({ children }: { children: React.ReactNode }) => { const cookieStore = await cookies(); - const defaultOpen = cookieStore.get("sidebar_state")?.value !== "false"; + const sidebarOpenFromCookie = + cookieStore.get("sidebar_state")?.value !== "false"; return ( - - {/* Mobile-only fixed header */} - + + {/* Mobile-only top bar */} + {/* Full-height sidebar */} - + - {/* Content area */} + {/* Main content area */}
{/* Desktop-only top bar */} - +
{children} diff --git a/app/(root)/page.tsx b/app/(root)/page.tsx index 6bd8036..dd2a9c0 100644 --- a/app/(root)/page.tsx +++ b/app/(root)/page.tsx @@ -1,8 +1,8 @@ -const Home = () => ( +const HomePage = () => ( <>

Hello Root page with heading H1

- {/* Header boundary marker */} + {/* Demo: top overflow test */}
{"words ".repeat(50)}
{/* Flexbox demo: grow vs flex-none */} @@ -23,22 +23,22 @@ const Home = () => (
- {/* Footer boundary marker */} + {/* Demo: bottom overflow test */}
{"words ".repeat(50)}
{/* Question boxes for testing sticky sidebar scroll */}
- {[1, 2, 3, 4].map((num) => ( + {[1, 2, 3, 4].map((questionIndex) => (
- Question #{num} + Question #{questionIndex} - Asked {num} hours ago + Asked {questionIndex} hours ago
@@ -69,15 +69,21 @@ const Home = () => ( {/* Stats */}
- {num * 7}{" "} + + {questionIndex * 7} + {" "} votes - {num * 3}{" "} + + {questionIndex * 3} + {" "} answers - {num * 47}{" "} + + {questionIndex * 47} + {" "} views
@@ -92,4 +98,4 @@ const Home = () => ( ); -export default Home; +export default HomePage; diff --git a/app/layout.tsx b/app/layout.tsx index 53b9a4c..7d33c76 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,8 +1,8 @@ import type { Metadata } from "next"; import { Suspense } from "react"; import { inter, jetbrainsMono, spaceGrotesk } from "@/app/fonts"; -import { ClerkProvider } from "@/components/clerk-provider"; -import { ThemeProvider } from "@/components/theme-provider"; +import { ClerkProvider } from "@/components/providers/clerk-provider"; +import { ThemeProvider } from "@/components/providers/theme-provider"; import "@/app/globals.css"; export const metadata: Metadata = { diff --git a/components/navigation/content-top-bar.tsx b/components/navigation/desktop-top-bar.tsx similarity index 76% rename from components/navigation/content-top-bar.tsx rename to components/navigation/desktop-top-bar.tsx index e05e16c..7ec9d2e 100644 --- a/components/navigation/content-top-bar.tsx +++ b/components/navigation/desktop-top-bar.tsx @@ -1,23 +1,21 @@ import { SignedOut, SignInButton, SignUpButton } from "@clerk/nextjs"; import { ThemeToggle } from "@/components/navigation/theme-toggle"; import { Button } from "@/components/ui/button"; -import { CONTENT_HORIZONTAL_PADDING, cn, HEADER_HEIGHT } from "@/lib/utils"; +import { cn, LAYOUT_HORIZONTAL_PADDING, TOP_BAR_HEIGHT } from "@/lib/utils"; -export function ContentTopBar() { +export function DesktopTopBar() { return (