Class: Navtastic::Renderer::Bulma
Overview
This renderer adds css classes and structure for the bulma.io framework
Instance Method Summary
collapse
#menu_inside_container?, render
Instance Method Details
#item_content(item) ⇒ Object
29
30
31
32
33
34
35
|
# File 'lib/navtastic/renderer/bulma.rb', line 29
def item_content(item)
element = super(item)
element.class_list << 'is-active' if item.current?
element
end
|
#item_tag(item) ⇒ Object
21
22
23
24
25
26
27
|
# File 'lib/navtastic/renderer/bulma.rb', line 21
def item_tag(item)
if && item..root?
para(class: 'menu-label') { yield }
else
li { yield }
end
end
|
13
14
15
16
17
18
19
|
# File 'lib/navtastic/renderer/bulma.rb', line 13
def ()
if && .root?
nav(class: 'menu') { yield }
else
ul(class: 'menu-list') { yield }
end
end
|
9
10
11
|
# File 'lib/navtastic/renderer/bulma.rb', line 9
def (item)
!( && item..root?)
end
|