Sha256: b624e4d3eb684a3acf707b535c505beec8608c234b836b24eb1918768ce62084

Contents?: true

Size: 1.78 KB

Versions: 1

Compression:

Stored size: 1.78 KB

Contents

<nav class="flex flex-1 flex-col">
  <ul role="list" class="flex flex-1 flex-col">
    <li>
      <img src="/panda-cms-assets/panda-nav.png" class="lg:h-32 h-16 py-2 w-auto inline">
      <a class="text-white font-medium text-lg ml-2 lg:hidden"><%= PandaCms.title %></a>
      <a class="text-white right-0 absolute text-lg mt-4 mr-5 lg:hidden" href="#" data-action="click->panda-cms-menu#toggle touch->panda-cms-menu#toggle"><i class="fa-sharp fa-solid fa-bars text-white mr-2"></i> Menu</a>
    </li>

    <% [
      { path: admin_dashboard_path, text: "Dashboard", icon: "fa-house", matcher: :exact },
      { path: admin_pages_path, text: "Pages", icon: "fa-page", matcher: :starts_with },
      { path: admin_posts_path, text: "Posts", icon: "fa-notebook", matcher: :starts_with },
      { path: admin_forms_path, text: "Forms", icon: "fa-cabinet-filing", matcher: :starts_with },
      { path: admin_menus_path, text: "Menus", icon: "fa-list-dropdown", matcher: :starts_with },
      { path: admin_settings_path, text: "Settings", icon: "fa-cog", matcher: :starts_with },
    ].each do |link| %>
    <li>
      <%= link_to link[:path], class: "#{active_link?(link[:path], match: link[:matcher]) ? selected_nav_highlight_colour_classes(request) : nav_highlight_colour_classes(request)}" do %>
        <span class="text-center"><i class="fa-regular <%= link[:icon] %> text-xl fa-fw"></i></span>
        <span class="mt-1"><%= link[:text] %></span>
      <% end %>
    </li>
    <% end %>
    <li>
      <%= button_to admin_logout_path, method: :delete, data: { turbo: false }, class: nav_highlight_colour_classes(request) + " w-full" do %>
        <span class="text-center"><i class="fa-regular fa-door-open text-xl fa-fw"></i></span>
        <span class="mt-1">Sign Out</span>
      <% end %>
    </li>
  </ul>
</nav>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
panda_cms-0.3.7 app/views/panda_cms/admin/shared/_sidebar.html.erb