Class: TinyAdmin::Views::Components::Head
- Inherits:
-
BasicComponent
- Object
- Phlex::HTML
- BasicComponent
- TinyAdmin::Views::Components::Head
- Defined in:
- lib/tiny_admin/views/components/head.rb
Instance Attribute Summary collapse
-
#extra_styles ⇒ Object
Returns the value of attribute extra_styles.
-
#page_title ⇒ Object
Returns the value of attribute page_title.
-
#style_links ⇒ Object
Returns the value of attribute style_links.
Instance Method Summary collapse
Methods inherited from BasicComponent
Instance Attribute Details
#extra_styles ⇒ Object
Returns the value of attribute extra_styles.
7 8 9 |
# File 'lib/tiny_admin/views/components/head.rb', line 7 def extra_styles @extra_styles end |
#page_title ⇒ Object
Returns the value of attribute page_title.
7 8 9 |
# File 'lib/tiny_admin/views/components/head.rb', line 7 def page_title @page_title end |
#style_links ⇒ Object
Returns the value of attribute style_links.
7 8 9 |
# File 'lib/tiny_admin/views/components/head.rb', line 7 def style_links @style_links end |
Instance Method Details
#view_template ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/tiny_admin/views/components/head.rb', line 9 def view_template head { charset: 'utf-8' name: 'viewport', content: 'width=device-width, initial-scale=1' title { page_title } style_links.each do |style_link| link(**style_link) end style { extra_styles } if extra_styles } end |