Class: RubyUIAdmin::Views::Docs
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- RubyUIAdmin::Views::Docs
- Defined in:
- app/components/ruby_ui_admin/views/docs.rb
Overview
Standalone, self-contained page for the dev-only docs browser. Deliberately does NOT use the admin layout or the host's RubyUI/Tailwind assets — it ships its own minimal CSS so it renders correctly even in a freshly-installed host where the admin's styling isn't wired up yet.
Instance Method Summary collapse
-
#initialize(body_html:, title:, nav_groups:, current_slug:) ⇒ Docs
constructor
A new instance of Docs.
- #view_template ⇒ Object
Constructor Details
#initialize(body_html:, title:, nav_groups:, current_slug:) ⇒ Docs
Returns a new instance of Docs.
9 10 11 12 13 14 |
# File 'app/components/ruby_ui_admin/views/docs.rb', line 9 def initialize(body_html:, title:, nav_groups:, current_slug:) @body_html = body_html @title = title @nav_groups = nav_groups @current_slug = current_slug end |
Instance Method Details
#view_template ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'app/components/ruby_ui_admin/views/docs.rb', line 16 def view_template doctype html(lang: "en") do head do (charset: "utf-8") (name: "viewport", content: "width=device-width, initial-scale=1") title { "#{@title} · RubyUI Admin docs" } style { raw(safe(STYLES)) } end body do div(class: "rua-docs") do main(class: "rua-docs-main") do article(class: "rua-prose") { raw(safe(@body_html)) } end end end end end |