/* global React */ const { useState } = React; // ============================================================ // TOP NAV // ============================================================ function TopNav({ theme = "dark", onToggleTheme = () => {}, locale = "EN" }) { return (
Nibiru
Create, Invent, Impress
); } function LotusMark({ size = 36 }) { // Real Nibiru logo, sourced from window.NIBIRU_LOTUS so the bundler picks it up // (it would miss a relative path inside a JSX template string). const src = (typeof window !== "undefined" && window.NIBIRU_LOTUS) || "docs-system/assets/lotus.png"; return ( Nibiru ); } // ============================================================ // SIDEBAR // ============================================================ function Sidebar() { const [openSections, setOpenSections] = useState({ "get-started": true, "framework": true, "cli": false, "advanced": false, }); const toggle = (id) => setOpenSections((s) => ({ ...s, [id]: !s[id] })); const nav = [ { id: "get-started", label: "Get Started", items: [ { label: "What is Nibiru?", active: true }, { label: "Why Nibiru, not Laravel" }, { label: "Installation" }, { label: "Quick Start" }, { label: "Project Structure" }, { label: "Run It Locally" }, { label: "Deployment" }, ], }, { id: "framework", label: "The Framework", items: [ { label: "Architecture (MMVC)" }, { label: "Bootstrap & Dispatcher" }, { label: "Routing" }, { label: "Controllers" }, { label: "Views & Smarty" }, { label: "Models" }, { label: "Modules", badge: "core" }, { label: "Forms" }, { label: "Database & Migrations" }, { label: "Auth" }, { label: "Config & Settings" }, { label: "Pagination" }, { label: "Registry" }, ], }, { id: "cli", label: "CLI", items: [ { label: "nibiru new" }, { label: "nibiru migrate" }, { label: "nibiru make" }, ], }, { id: "advanced", label: "Advanced", items: [ { label: "Plugins" }, { label: "Observer pattern" }, { label: "Caching", badge: "new" }, ], }, ]; return ( ); } // ============================================================ // RIGHT TOC ("On this page") // ============================================================ function RightTOC({ items, activeId }) { return ( ); } Object.assign(window, { TopNav, Sidebar, RightTOC, LotusMark });