diff --git a/web/app/docs/layout.tsx b/web/app/docs/layout.tsx
index 1da0de0..a3b6328 100644
--- a/web/app/docs/layout.tsx
+++ b/web/app/docs/layout.tsx
@@ -1,6 +1,7 @@
import type React from "react"
import DocSidebar from "@/components/DocSidebar"
import Footer from "@/components/footer"
+import { DocNavigation } from "@/components/ui/doc-navigation"
export default function DocsLayout({ children }: { children: React.ReactNode }) {
return (
@@ -8,10 +9,14 @@ export default function DocsLayout({ children }: { children: React.ReactNode })
- {children}
+
+ {children}
+
+
)
}
+
diff --git a/web/components/DocSidebar.tsx b/web/components/DocSidebar.tsx
index 4eb163e..d1136a2 100644
--- a/web/components/DocSidebar.tsx
+++ b/web/components/DocSidebar.tsx
@@ -16,7 +16,7 @@ interface MenuItem {
submenu?: SubMenuItem[]
}
-const sidebarItems: MenuItem[] = [
+export const sidebarItems: MenuItem[] = [
{ title: "Introduction", href: "/docs/introduction" },
{ title: "Installation", href: "/docs/installation" },
{
diff --git a/web/components/ui/doc-navigation.tsx b/web/components/ui/doc-navigation.tsx
new file mode 100644
index 0000000..87b268c
--- /dev/null
+++ b/web/components/ui/doc-navigation.tsx
@@ -0,0 +1,88 @@
+"use client"
+
+import Link from "next/link"
+import { ChevronLeft, ChevronRight } from "lucide-react"
+import { usePathname } from "next/navigation"
+import { sidebarItems } from "@/components/DocSidebar"
+
+interface DocNavigationProps {
+ className?: string
+}
+
+export function DocNavigation({ className }: DocNavigationProps) {
+ const pathname = usePathname()
+
+ const flattenSidebarItems = () => {
+ const flatItems: Array<{ title: string; href: string; section?: string }> = []
+
+ sidebarItems.forEach((item) => {
+ if (item.href) {
+ flatItems.push({ title: item.title, href: item.href })
+ }
+
+ if (item.submenu) {
+ item.submenu.forEach((subItem) => {
+ flatItems.push({
+ title: subItem.title,
+ href: subItem.href,
+ section: item.title,
+ })
+ })
+ }
+ })
+
+ return flatItems
+ }
+
+ const allPages = flattenSidebarItems()
+
+ const currentPageIndex = allPages.findIndex((page) => page.href === pathname)
+
+ const prevPage = currentPageIndex > 0 ? allPages[currentPageIndex - 1] : null
+ const nextPage = currentPageIndex < allPages.length - 1 ? allPages[currentPageIndex + 1] : null
+
+ if (!prevPage && !nextPage) return null
+
+ return (
+
+
+
+
+
+ {prevPage ? (
+
+
+
+
+ {prevPage.section ? `${prevPage.section}: ` : ""}Previous
+
+
{prevPage.title}
+
+
+ ) : (
+
+ )}
+
+ {nextPage ? (
+
+
+
+ {nextPage.section ? `${nextPage.section}: ` : ""}Next
+
+
{nextPage.title}
+
+
+
+ ) : (
+
+ )}
+
+
+ )
+}