Host-owned layout entrypoints and shared layout helpers.
Summary
Functions
Renders the application layout shell.
Shows the flash group with standard titles and content.
Encodes a schema.org object for an application/ld+json script tag.
Deep-rewrites every "href" in a theme fragment through localized_href/2.
Rewrites an internal path so it keeps the reader's locale prefix.
Provides dark vs light theme toggle based on themes defined in app.css.
Functions
Renders the application layout shell.
Attributes
flash(:map) (required) - the map of flash messages.current_scope(:map) - the current scope. Defaults tonil.current_path(:string) - current request path for nav active state. Defaults tonil.flush(:boolean) - when true, render content edge-to-edge with no main wrapper, padding, or footer. Defaults tofalse.background_icons(:any) - passfalsewhen the page paints its own decorative icon layer, asGamendWeb.PresentationPagedoes — otherwise the shell adds a second one on top. Defaults tonil.
Slots
inner_block(required)
Shows the flash group with standard titles and content.
Attributes
flash(:map) (required) - the map of flash messages.id(:string) - the optional id of flash container. Defaults to"flash-group".
Encodes a schema.org object for an application/ld+json script tag.
nil values are dropped so callers can build objects with optional fields
without emitting null, which validators flag. < is escaped because a
</script> inside a string would otherwise close the tag early — the one
way JSON-LD turns into an injection vector.
Deep-rewrites every "href" in a theme fragment through localized_href/2.
The nav, footer and presentation-page sections are all plain config maps, so one walk covers every configured link rather than one edit per template.
Rewrites an internal path so it keeps the reader's locale prefix.
Without this the prefix survives exactly one click: /fr/about renders in
French, but every link out of it points at a clean path, so the next page is
back at /play — French only because the session says so. That URL is then
wrong in the two places it matters, sharing it hands the recipient English,
and it is the English URL that gets bookmarked and linked to.
Leaves alone: the default locale (its pages are the clean URLs), external
and protocol-relative hrefs, and any path LocalePath does not serve under a
prefix — pointing at /fr/blog/some-post when that only redirects would just
spend a redirect per link.
Provides dark vs light theme toggle based on themes defined in app.css.