Skip to main content

Module layout

Module layout 

Source
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.
AuthLayout
Centered card layout for authentication pages (login, register).
DashboardLayout
Dashboard layout with persistent sidebar, header, and main content area.
DashboardLayoutConfig
Configuration for DashboardLayout.
DefaultLayout
Minimal layout wrapping content in a valid HTML page.
LayoutContext
Context passed to layout render functions.
LayoutRegistry
Registry mapping layout names to implementations.
NavItem
A navigation link item.
SidebarSection
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.