Class: DocsUI::Shell

Inherits:
Phlex::HTML
  • Object
show all
Includes:
DaisyUI, Phlex::Rails::Helpers::CSPMetaTag, Phlex::Rails::Helpers::CSRFMetaTags, Phlex::Rails::Helpers::ContentSecurityPolicyNonce, Phlex::Rails::Helpers::JavaScriptImportmapTags, Phlex::Rails::Helpers::StylesheetLinkTag
Defined in:
app/components/docs_ui/shell.rb

Overview

The site shell — the full HTML document. A Phlex layout built on the daisyUI Drawer: a sticky topbar, a sidebar always visible on desktop (lg:drawer-open) that toggles as an overlay on mobile, and the page content in a scrollable main. Loads Turbo + (when present) the phlex-reactive Stimulus controller via the importmap tags, and the daisyUI-compiled Tailwind build.

Shell IS the full document, so controllers render the page view with layout: false (see DocsKit::Controller#render_page) to avoid double nesting. phlex-rails still renders through a real view context, so CSRF, dom_id, url helpers, and the reactive token signer all work inside components.

render DocsUI::Shell.new(title: "Installation") { page_body }

Constant Summary collapse

DRAWER_ID =
"site-drawer"

Instance Method Summary collapse