Documentation
¶
Overview ¶
Package render builds the tool.RenderFunc that wraps a body fragment in wick's page shell (Layout + Navbar). Lives outside internal/pkg/ui to avoid an import cycle with internal/login (which already depends on ui).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewToolRenderer ¶
func NewToolRenderer(hasConfigs bool) tool.RenderFunc
NewToolRenderer builds a tool.RenderFunc that wraps a body fragment in the wick page shell (Layout + Navbar + setup banner + ToolHeader) and writes the full HTML response. The shared ToolHeader renders the tool's icon/name/description so tool bodies must omit their own <h1>/description block. Missing-config state is pulled from the *tool.Ctx via c.Missing() — no config service threading required.
Requests that arrive inside a frame (see ui.DetectEmbedded) render the body alone — no Navbar, no ToolHeader, no setup banner — so the page drops cleanly into another tool's iframe. Full-screen tools are exempt: their own chrome is the tool.
Handlers that return JSON, file downloads, or redirects should write to the ResponseWriter directly and not call the returned RenderFunc.
Types ¶
This section is empty.