- Restructure flat static prototype into pnpm workspace monorepo - apps/game: playable shell with R3F 3D scene, HUD, SpacetimeDB connection - apps/docs: design docs and prototypes - apps/site: landing page - packages/ui: shared Button and Panel primitives - services/spacetimedb: backend module (9 tables, 11 reducers) - Archive legacy static files to archive/legacy-static/ - Game loop: connect, undock, target, approach, dock, mine, sell - Add pnpm-workspace.yaml, tsconfig.base.json, spacetime.json
35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
import { useState } from "react";
|
|
import { Outlet, useLocation } from "react-router-dom";
|
|
import { Sidebar } from "../components/Sidebar";
|
|
import { TopBar } from "../components/TopBar";
|
|
|
|
export function DocsLayout() {
|
|
const [collapsed, setCollapsed] = useState(false);
|
|
const { pathname } = useLocation();
|
|
const isFullscreenDemo = pathname.startsWith("/docs/demos/") || pathname.startsWith("/docs/prototypes/");
|
|
|
|
if (isFullscreenDemo) {
|
|
return (
|
|
<div className="flex h-screen w-full overflow-hidden bg-black max-md:block">
|
|
<div className="flex min-w-0 flex-1 flex-col overflow-hidden max-md:h-screen">
|
|
<div className="min-h-0 flex-1 overflow-auto overscroll-contain p-0">
|
|
<Outlet />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<div className="flex h-screen w-full overflow-hidden max-md:flex-col">
|
|
<Sidebar collapsed={collapsed} />
|
|
<div className="flex min-w-0 flex-1 flex-col overflow-hidden max-md:min-h-0">
|
|
<TopBar collapsed={collapsed} onToggle={() => setCollapsed((value) => !value)} />
|
|
<div className="min-h-0 flex-1 overflow-y-auto overscroll-contain bg-bg px-10 py-8 max-md:px-5 max-md:py-4">
|
|
<Outlet />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|