Sha256: cbb1ecb8ccf059e7149b8d19d0d33d575ab0e8b8814afa864a6be3c0da55952a
Contents?: true
Size: 1.08 KB
Versions: 1
Compression:
Stored size: 1.08 KB
Contents
<nav class="<%= styles[:container] %>"> <ul role="list" class="p-0 m-0"> <li> <a href="<%= menu_item.page.path %>" class="<%= menu_item.page == PandaCms::Current.page ? styles[:current_page_active] : styles[:current_page_inactive] %>"> <%= menu_item.text %> </a> </li> <ul> <% PandaCms::MenuItem.includes(:page).each_with_level(menu_item.descendants) do |submenu_item, level| %> <% next if PandaCms::Current.page == menu_item.page && level > 1 # If we're on the "top" menu item, only show its direct ancestors %> <% next if submenu_item.page.depth > PandaCms::Current.page.depth && !PandaCms::Current.page.in?(submenu_item.page.ancestors) %> <li data-level="<%= level %>" data-page-id="<%= submenu_item.page.id %>" class="<%= submenu_item.page == PandaCms::Current.page ? @styles[:active] : @styles[:inactive] %>"> <a href="<%= submenu_item.page.path %>" class="<%= helpers.menu_indent(submenu_item, indent_with: @styles[:indent_with]) %>"><%= submenu_item.page.title %></a> </li> <% end %> </ul> </ul> </nav>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
panda_cms-0.6.0 | app/components/panda_cms/page_menu_component.html.erb |