module BootstrapNavbar::Helpers::Bootstrap3

Public Instance Methods

navbar(options = {}, &block) click to toggle source
navbar_button(text, options = {}) click to toggle source
navbar_collapse(options = {}, &block) click to toggle source
navbar_dropdown(text, list_item_options = {}, link_options = {}, &block) click to toggle source
navbar_dropdown_divider() click to toggle source
navbar_dropdown_header(text) click to toggle source
navbar_form(url, options = {}, &block) click to toggle source
navbar_group(options = {}, &block) click to toggle source
navbar_header(options = {}, &block) click to toggle source
navbar_item(text, url = nil, list_item_options = nil, link_options = nil, &block) click to toggle source
navbar_text(text = nil, options = {}, &block) click to toggle source

Private Instance Methods

container(type, &block) click to toggle source
# File lib/bootstrap-navbar/helpers/bootstrap3.rb, line 144
  def container(type, &block)
    css_class = 'container'
    css_class << "-#{type}" if type.is_a?(String)
    attributes = attributes_for_tag(class: css_class)
    prepare_html <<-HTML.chomp!
<div#{attributes}>
  #{capture(&block) if block_given?}
</div>
HTML
  end
wrapper(options, &block) click to toggle source
# File lib/bootstrap-navbar/helpers/bootstrap3.rb, line 164
  def wrapper(options, &block)
    options = options.dup
    options[:class] = [options[:class], 'navbar'].compact
    options[:class] << "navbar-#{options.delete(:inverse) ? 'inverse' : 'default'}"
    options[:class] << "navbar-fixed-#{options.delete(:fixed)}" if options.key?(:fixed)
    options[:class] << 'navbar-static-top' if options.delete(:static)
    options[:class] = options[:class].join(' ')
    options[:role] ||= 'navigation'
    attributes = attributes_for_tag(options)
    prepare_html <<-HTML.chomp!
<nav#{attributes}>
  #{capture(&block) if block_given?}
</nav>
HTML
  end