Module: Lipstick::Helpers::NavHelper

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

Instance Method Summary collapse

Instance Method Details



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

def nav_bar
  ('nav', class: 'navbar shrink') { yield }
end


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

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


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

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


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

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