class UiBibz::Ui::Core::Boxes::Jumbotron

Create a jumbotron

This element is an extend of UiBibz::Ui::Core::Component.

Attributes

Options

You can add HTML attributes using the html_options. You can pass arguments in options attribute:

Signatures

UiBibz::Ui::Core::Boxes::Jumbotron.new(content, options = nil, html_options = nil)

UiBibz::Ui::Core::Boxes::Jumbotron.new(options = nil, html_options = nil) do
  content
end

Examples

UiBibz::Ui::Core::Boxes::Jumbotron.new(content, full_width: true).render

UiBibz::Ui::Core::Boxes::Jumbotron.new() do
  #content
end.render

Helper

jumbotron(content, options = {} , html_options = {})

jumbotron(options = {}, html_options = {}) do
  content
end

Public Instance Methods

pre_render() click to toggle source

Render html tag

# File lib/ui_bibz/ui/core/boxes/jumbotron.rb, line 48
def pre_render
  content_tag :div, html_options do
    if fluid
      UiBibz::Ui::Core::Layouts::Container.new(content).render
    else
      content
    end
  end
end

Private Instance Methods

component_html_classes() click to toggle source
# File lib/ui_bibz/ui/core/boxes/jumbotron.rb, line 60
def component_html_classes
  ['jumbotron', fluid, 'bg-light', 'rounded p-4']
end
fluid() click to toggle source
# File lib/ui_bibz/ui/core/boxes/jumbotron.rb, line 64
def fluid
  'jumbotron-fluid' unless options[:fluid].nil?
end