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