Module: BootstrapStyleguide::ApplicationHelper

Defined in:
app/helpers/bootstrap_styleguide/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#components_itemsObject



15
16
17
18
19
20
21
# File 'app/helpers/bootstrap_styleguide/application_helper.rb', line 15

def components_items
  [
    :accordion, :alerts, :badge, :breadcrumbs, :buttons, :button_group, :cards, :carousel,
    :close_button, :collapse, :dropdowns, :modal, :navs_and_tabs, :navbar, :offcanvas, :pagination,
    :popovers, :progress, :spinners, :toasts, :tooltips
  ]
end

#content_itemsObject



7
8
9
# File 'app/helpers/bootstrap_styleguide/application_helper.rb', line 7

def content_items
  [:typography, :images, :tables]
end

#example_with_code(&block) ⇒ Object



27
28
29
30
31
32
33
34
35
# File 'app/helpers/bootstrap_styleguide/application_helper.rb', line 27

def example_with_code(&block)
  content = capture(&block)

  content += tag.pre class: 'bg-light-gray mt-3 pb-3' do
    tag.code do
      "#{content}"
    end
  end
end

#forms_itemsObject



11
12
13
# File 'app/helpers/bootstrap_styleguide/application_helper.rb', line 11

def forms_items
  [:select, :checks_and_radios, :range, :input_group, :floating_labels]
end

#layout_itemsObject



3
4
5
# File 'app/helpers/bootstrap_styleguide/application_helper.rb', line 3

def layout_items
  [:breakpoints, :containers, :grid]
end

#utilities_itemsObject



23
24
25
# File 'app/helpers/bootstrap_styleguide/application_helper.rb', line 23

def utilities_items
  [:background, :borders, :colors, :shadows, :spacing, :text]
end