Sha256: 81d58cba581f3a357eca3c1702d82e851000fe082da576fe972517ff3b125055

Contents?: true

Size: 1.59 KB

Versions: 3

Compression:

Stored size: 1.59 KB

Contents

<aside class="app-sidebar navbar-expand-md" id="app-sidebar">
  <header class="app-sidebar-header">
    <button class="navbar-toggler" type="button" aria-controls="app-sidebar" aria-expanded="false" aria-label="<%= t("trestle.ui.toggle_navigation", default: "Toggle navigation") %>">
      <span class="navbar-toggler-icon"></span>
    </button>

    <%= link_to Trestle.config.root, class: "app-sidebar-title" do %>
      <%= hook("view.title") { render "trestle/shared/title" } %>
    <% end %>
  </header>

  <div class="app-sidebar-inner">
    <nav class="app-nav">
      <% collapsed = cookies["trestle:navigation:collapsed"].try(:split, ",") || [] %>
      <% Trestle.navigation(self).each do |group, items| %>
        <ul<% if group.present? && collapsed.include?(group.id) %> class="collapsed"<% end %>>
          <% if group.present? %>
            <li class="nav-header"><%= link_to group.label, "##{group.id}" %></li>
          <% end %>

          <% items.each do |item| %>
            <li<% if current_navigation_item?(item) %> class="active"<% end %>>
              <%= link_to item.path, item.html_options do %>
                <%= icon("nav-icon", item.icon) %>
                <span class="nav-label"><%= item.label %></span>

                <%= content_tag(:span, item.badge.text, class: ["badge", item.badge.html_class]) if item.badge? %>
              <% end %>
            </li>
          <% end %>
        </ul>
      <% end %>
    </nav>

    <button class="toggle-sidebar">
      <span class="sr-only"><%= t("trestle.ui.toggle_sidebar", default: "Toggle sidebar") %></span>
    </button>
  </div>
</aside>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
trestle-0.9.4 app/views/trestle/shared/_sidebar.html.erb
trestle-0.9.3 app/views/trestle/shared/_sidebar.html.erb
trestle-0.9.2 app/views/trestle/shared/_sidebar.html.erb