Module: SolidWebUi::HeadHelper
- Defined in:
- lib/solid_web_ui/head_helper.rb
Overview
Emits the dashboards’ stylesheet + theme tokens. Included into ActionView app-wide (see SolidWebUi::Engine) so a host layout can drop ‘<%= solid_web_ui_head_tags %>` into its <head> when rendering the dashboards inside its own chrome (config.layout = “your_layout”).
Defined in lib/ (not app/helpers) because it is mixed into ActionView during boot, before the engine’s autoload paths are ready.
Instance Method Summary collapse
Instance Method Details
#solid_web_ui_head_tags ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/solid_web_ui/head_helper.rb', line 12 def = [] if SolidWebUi.config.stylesheet << stylesheet_link_tag("solid_web_ui", "data-turbo-track": "reload") end Array(SolidWebUi.config.extra_stylesheets).each do |sheet| << stylesheet_link_tag(sheet, "data-turbo-track": "reload") end << solid_web_ui_theme_style_tag safe_join() end |