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:
@@ -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: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user