Sha256: b2141705dbcd5f4037ebb0177ea2cca9e3ff43819cd9dcf62c20bcd9f3bf0fde

Contents?: true

Size: 1.25 KB

Versions: 8

Compression:

Stored size: 1.25 KB

Contents

<% inactive_nav_styles = "border-gray-200 text-slate-600 " %>
<% active_nav_styles = "bg-gray-100 text-blue-900 border-blue-900" %>

<nav class="flex flex-col flex-1">
  <ul role="list" class="flex flex-col flex-1">
    <li>
      <a href="<%= menu_item.page.path %>" class="border-l-2 hover:bg-gray-50 group flex px-3 py-2.5 text-lg leading-6 font-semibold <%= menu_item.page == PandaCms::Current.page ? active_nav_styles : inactive_nav_styles %>">
        <%= menu_item.text %>
      </a>
    </li>

    <div>
      <ul class="mt-1">
        <% PandaCms::MenuItem.each_with_level(menu_item.descendants) do |submenu_item, level| %>
          <li data-level="<%= level %>" data-page-id="<%= submenu_item.page.id %>" <% if level > 1 && !PandaCms::Current.page.id.in?(submenu_item.page.self_and_ancestors.ids + submenu_item.page.siblings.ids) %> class="hidden"<% end %>>
            <a href="<%= submenu_item.page.path %>" class="border-l-2 <%= helpers.menu_indent(submenu_item) %> hover:bg-gray-50 block px-3 py-2.5 text-base leading-6 font-regular <%= submenu_item.page == PandaCms::Current.page ? active_nav_styles : inactive_nav_styles %>">
              <%= submenu_item.page.title %>
            </a>
          </li>
        <% end %>
      </ul>
    </div>
  </ul>
</nav>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
panda_cms-0.5.7 app/components/panda_cms/page_menu_component.html.erb
panda_cms-0.5.6 app/components/panda_cms/page_menu_component.html.erb
panda_cms-0.5.5 app/components/panda_cms/page_menu_component.html.erb
panda_cms-0.5.4 app/components/panda_cms/page_menu_component.html.erb
panda_cms-0.5.3 app/components/panda_cms/page_menu_component.html.erb
panda_cms-0.5.2 app/components/panda_cms/page_menu_component.html.erb
panda_cms-0.5.1 app/components/panda_cms/page_menu_component.html.erb
panda_cms-0.5.0 app/components/panda_cms/page_menu_component.html.erb