Expand description
Layout system for JSON-UI page rendering.
Provides a trait-based layout system where named layouts wrap rendered
component HTML in full page shells. Three built-in layouts are provided:
DefaultLayout (minimal), AppLayout (dashboard with nav + sidebar),
and AuthLayout (centered card). DashboardLayout is an optional layout
that users register themselves with per-app config.
A global LayoutRegistry maps layout names to implementations. Views
specify a layout via JsonUiView.layout, and the render pipeline looks
it up in the registry.
Structs§
- AppLayout
- Dashboard-style layout with navigation bar, sidebar, and main content area.
- Auth
Layout - Centered card layout for authentication pages (login, register).
- Dashboard
Layout - Dashboard layout with persistent sidebar, header, and main content area.
- Dashboard
Layout Config - Configuration for
DashboardLayout. - Default
Layout - Minimal layout wrapping content in a valid HTML page.
- Layout
Context - Context passed to layout render functions.
- Layout
Registry - Registry mapping layout names to implementations.
- NavItem
- A navigation link item.
- Sidebar
Section - A sidebar section containing a title and a list of navigation items.
Traits§
- Layout
- Trait for layout implementations.
Functions§
- footer
- Render a simple footer.
- global_
registry - Access the global layout registry.
- navigation
- Render a horizontal navigation bar.
- register_
layout - Register a layout in the global registry.
- render_
layout - Render using the global registry.
- sidebar
- Render a vertical sidebar with sections.