Module: Lipstick::Helpers::NavHelper
- Defined in:
- lib/lipstick/helpers/nav_helper.rb
Instance Method Summary collapse
- #nav_bar(&block) ⇒ Object
- #nav_collapsing_items(&block) ⇒ Object
- #nav_first_item(text, url) ⇒ Object
- #nav_item(text, url, html_opts = {}) ⇒ Object
Instance Method Details
#nav_bar(&block) ⇒ Object
6 7 8 |
# File 'lib/lipstick/helpers/nav_helper.rb', line 6 def (&block) content_tag('nav', class: 'navbar shrink', &block) end |
#nav_collapsing_items(&block) ⇒ Object
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' } content_tag('div', attrs) do content_tag('ul', class: 'nav navbar-nav', &block) end end |
#nav_first_item(text, url) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/lipstick/helpers/nav_helper.rb', line 10 def nav_first_item(text, url) content_tag('div', class: 'nav navbar-header') do concat() concat(content_tag('a', text, href: url, class: 'navbar-brand')) end end |
#nav_item(text, url, html_opts = {}) ⇒ Object
24 25 26 27 28 |
# File 'lib/lipstick/helpers/nav_helper.rb', line 24 def nav_item(text, url, html_opts = {}) content_tag('li') do content_tag('a', text, html_opts.merge(href: url)) end end |