Class: UiBibz::Ui::Core::Jumbotron
Overview
Create a jumbotron
This element is an extend of UiBibz::Ui::Core::Component.
Attributes
-
content - Content of element
-
options - Options of element
-
html_options - Html Options of element
Options
You can add HTML attributes using the html_options. You can pass arguments in options attribute:
-
full_with - Boolean to render jumbotron in fullscreen
Signatures
UiBibz::Ui::Core::Jumbotron.new(content, = nil, = nil)
UiBibz::Ui::Core::Jumbotron.new( = nil, = nil) do
content
end
Examples
UiBibz::Ui::Core::Jumbotron.new(content, full_width: true).render
UiBibz::Ui::Core::Jumbotron.new() do
#content
end.render
Helper
jumbotron(content, = {} , = {})
jumbotron( = {}, = {}) do
content
end
Instance Attribute Summary
Attributes inherited from Component
#content, #html_options, #options
Attributes inherited from Base
Instance Method Summary (collapse)
-
- (Jumbotron) initialize(content = nil, options = nil, html_options = nil, &block)
constructor
See UiBibz::Ui::Core::Component.initialize.
-
- (Object) render
Render html tag.
Methods inherited from Component
#add_classes, #badge_html, #class_and_html_options, #glyph, #glyph_and_content_html, #glyph_with_space, #state
Methods inherited from Base
Constructor Details
- (Jumbotron) initialize(content = nil, options = nil, html_options = nil, &block)
See UiBibz::Ui::Core::Component.initialize
46 47 48 |
# File 'lib/ui_bibz/ui/core/jumbotron.rb', line 46 def initialize content = nil, = nil, = nil, &block super end |
Instance Method Details
- (Object) render
Render html tag
51 52 53 54 55 56 57 58 59 |
# File 'lib/ui_bibz/ui/core/jumbotron.rb', line 51 def render content_tag :div, ('jumbotron') do if full_width content_tag :div, @content, class: 'container' else @content end end end |