feat(website): add layout with header, sidebar, footer and navigation

- Create Header component with logo, nav, theme toggle, language switcher
- Create Sidebar component with doc navigation from config
- Create Footer component
- Create MobileNav component with hamburger menu
- Create navigation config file (docsConfig)
- Integrate all layout components into [locale]/layout.tsx
- Add framer-motion for mobile nav animations
- All tests passing, build successful
This commit is contained in:
justsisyphus
2026-01-24 12:11:59 +09:00
parent f28c8a45dd
commit 5d14e09279
9 changed files with 298 additions and 1 deletions
+88
View File
@@ -0,0 +1,88 @@
export type NavItem = {
title: string
href?: string
disabled?: boolean
external?: boolean
label?: string
items?: NavItem[]
}
export type MainNavItem = NavItem
export type SidebarNavItem = NavItem
export interface DocsConfig {
mainNav: MainNavItem[]
sidebarNav: SidebarNavItem[]
}
export const docsConfig: DocsConfig = {
mainNav: [
{
title: "Documentation",
href: "/docs",
},
{
title: "GitHub",
href: "https://github.com/code-yeongyu/oh-my-opencode",
external: true,
},
],
sidebarNav: [
{
title: "Getting Started",
items: [
{
title: "Introduction",
href: "/docs",
items: [],
},
{
title: "Installation",
href: "/docs/installation",
items: [],
},
],
},
{
title: "Configuration",
items: [
{
title: "Overview",
href: "/docs/config",
items: [],
},
{
title: "Reference",
href: "/docs/config/reference",
items: [],
},
],
},
{
title: "Core Concepts",
items: [
{
title: "Agents",
href: "/docs/agents",
items: [],
},
{
title: "Skills",
href: "/docs/skills",
items: [],
},
{
title: "Hooks",
href: "/docs/hooks",
items: [],
},
{
title: "Tools",
href: "/docs/tools",
items: [],
},
],
},
],
}