Sha256: b9ef0fa0be67d8a4160535dc23e5ae3dc7148f29f5412b29e9d7623cdfe920f7

Contents?: true

Size: 1.57 KB

Versions: 2

Compression:

Stored size: 1.57 KB

Contents

<aside class="app-sidebar">
  <header class="app-sidebar-header">
    <button class="navbar-toggle">
      <span class="sr-only"><%= t("trestle.ui.toggle_navigation", default: "Toggle navigation") %></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </button>

    <%= link_to Trestle.config.root, class: "navbar-brand" 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.visible(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 do %>
                <%= icon("nav-icon", item.icon) %>
                <span class="nav-label"><%= item.label %></span>

                <%= content_tag(:span, item.badge.text, class: ["nav-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

2 entries across 2 versions & 1 rubygems

Version Path
trestle-0.8.11 app/views/trestle/shared/_sidebar.html.erb
trestle-0.8.10 app/views/trestle/shared/_sidebar.html.erb