Sha256: 5f0fc7e66d7983db5f147a3b2d1bd3083447e0ead79b254cc1a823d2123edf9f

Contents?: true

Size: 1.87 KB

Versions: 1

Compression:

Stored size: 1.87 KB

Contents

<aside class="app-sidebar navbar navbar-expand-md" id="app-sidebar" data-controller="sidebar mobile-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") %>" data-action="mobile-sidebar#toggle">
      <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" data-sidebar-target="inner">
    <nav class="app-nav" data-controller="navigation">
      <% 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}", data: { action: "navigation#toggle" } %></li>
          <% end %>

          <% items.each do |item| %>
            <%= content_tag(:li, class: ("active" if current_navigation_item?(item))) do %>
              <%= link_to item.path, item.html_options.merge(data: { controller: "navigation-tooltip" }) do %>
                <%= icon("nav-icon", item.icon) %>
                <span class="nav-label" data-navigation-tooltip-target="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" data-action="sidebar#toggle">
      <span class="visually-hidden"><%= t("trestle.ui.toggle_sidebar", default: "Toggle sidebar") %></span>
    </button>
  </div>
</aside>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
trestle-0.10.0.pre app/views/trestle/shared/_sidebar.html.erb