Module: Lipstick::Helpers::NavHelper

Defined in:
lib/lipstick/helpers/nav_helper.rb

Instance Method Summary collapse

Instance Method Details



6
7
8
# File 'lib/lipstick/helpers/nav_helper.rb', line 6

def nav_bar(&block)
  ('nav', class: 'navbar shrink', &block)
end


17
18
19
20
21
22
# File 'lib/lipstick/helpers/nav_helper.rb', line 17

def nav_collapsing_items(&block)
  attrs = { class: 'collapse navbar-collapse', id: 'aaf-nav-collapse' }
  ('div', attrs) do
    ('ul', class: 'nav navbar-nav', &block)
  end
end


10
11
12
13
14
15
# File 'lib/lipstick/helpers/nav_helper.rb', line 10

def nav_first_item(text, url)
  ('div', class: 'nav navbar-header') do
    concat(nav_collapse_button)
    concat(('a', text, href: url, class: 'navbar-brand'))
  end
end


24
25
26
27
28
# File 'lib/lipstick/helpers/nav_helper.rb', line 24

def nav_item(text, url, html_opts = {})
  ('li') do
    ('a', text, html_opts.merge(href: url))
  end
end