import { useState } from "react"; import { Link, Outlet, useLocation } from "react-router-dom"; import Layout from "@/components/Layout"; import { Input } from "@/components/ui/input"; import { Badge } from "@/components/ui/badge"; import { BookOpen, FileText, Video, Code, Terminal, Search, Puzzle, Home, GraduationCap, ChevronRight, Menu, X, LayoutDashboard, } from "lucide-react"; const navigation = [ { name: "Overview", href: "/docs", icon: Home, exact: true, }, { name: "Getting Started", href: "/docs/getting-started", icon: BookOpen, }, { name: "Curriculum", href: "/docs/curriculum", icon: GraduationCap, badge: "New", }, { name: "Platform", href: "/docs/platform", icon: LayoutDashboard, }, { name: "Tutorials", href: "/docs/tutorials", icon: Video, badge: "New", }, { name: "API Reference", href: "/docs/api", icon: Code, }, { name: "CLI Tools", href: "/docs/cli", icon: Terminal, }, { name: "Examples", href: "/docs/examples", icon: FileText, }, { name: "Integrations", href: "/docs/integrations", icon: Puzzle, }, ]; export default function DocsLayout() { const [searchQuery, setSearchQuery] = useState(""); const [sidebarOpen, setSidebarOpen] = useState(false); const location = useLocation(); const isActive = (href: string, exact = false) => { if (exact) { return location.pathname === href; } return location.pathname.startsWith(href); }; const getBreadcrumb = () => { const path = location.pathname; const segments = path.split("/").filter(Boolean); if (segments.length <= 1) return []; const breadcrumbs = []; let currentPath = ""; segments.forEach((segment, index) => { currentPath += `/${segment}`; if (index > 0) { // Skip the first 'docs' segment breadcrumbs.push({ name: segment.charAt(0).toUpperCase() + segment.slice(1).replace("-", " "), href: currentPath, isLast: index === segments.length - 1, }); } }); return breadcrumbs; }; const breadcrumbs = getBreadcrumb(); return (
{/* Header */}

AeThex Documentation

Comprehensive guides, tutorials, and API references

{/* Breadcrumb */} {breadcrumbs.length > 0 && ( )} {/* Search */}
setSearchQuery(e.target.value)} className="pl-10 bg-slate-800/50 border-slate-600 text-white placeholder-gray-500 focus:border-purple-500 focus:ring-1 focus:ring-purple-500/50" />
{/* Sidebar */} {/* Content */}
); }