Sha256: b81f4e35077a2fa976df92ccdcbc28c0e1b5e48d42551cf5f5f7a1ed35a27277

Contents?: true

Size: 1.57 KB

Versions: 4

Compression:

Stored size: 1.57 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">
      <% Trestle.navigation(self).each do |group, items| %>
        <%= content_tag(:ul, class: ("collapsed" if group.present? && navigation_group_collapsed?(group)), data: { group: group.id }) do %>
          <% if group.present? %>
            <li class="nav-header"><%= link_to group.label, "##{group.id}" %></li>
          <% end %>

          <% items.each do |item| %>
            <%= content_tag(:li, class: ("active" if current_navigation_item?(item))) do %>
              <%= 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 %>
            <% end %>
          <% end %>
        <% end %>
      <% 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

4 entries across 4 versions & 1 rubygems

Version Path
trestle-0.9.8 app/views/trestle/shared/_sidebar.html.erb
trestle-0.9.7 app/views/trestle/shared/_sidebar.html.erb
trestle-0.9.6 app/views/trestle/shared/_sidebar.html.erb
trestle-0.9.5 app/views/trestle/shared/_sidebar.html.erb