Sha256: 933c9b28ab72061f68f42cf2acea4a6bd07f1eb5abccf645b9b288fa3028e3ae

Contents?: true

Size: 750 Bytes

Versions: 10

Compression:

Stored size: 750 Bytes

Contents

<%#
    headmin/nav/item
    accepts block: yes
    parameters:
      url: (string) Url to be used as anchor in link tag
      name: (string) Name to be displayed inside link
      active: (boolean) Whether to highlight the item or not
%>
<% name = local_assigns.has_key?(:name) ? name : '' %>
<% icon = local_assigns.has_key?(:icon) ? icon : nil %>
<% url = local_assigns.has_key?(:url) ? url : '' %>
<% active = local_assigns.has_key?(:active) ? current_url?(url) : false %>

<li class="nav-item">
  <a class="nav-link d-flex align-items-center <%= 'active' if active %>" aria-current="page" href="<%= url %>">
    <%= bootstrap_icon(icon, class: 'me-2') if icon %>
    <span class="d-block d-md-none d-lg-block">
  <%= name %>
</span>
  </a>
</li>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
headmin-0.2.9 app/views/headmin/nav/_item.html.erb
headmin-0.2.8 app/views/headmin/nav/_item.html.erb
headmin-0.2.7 app/views/headmin/nav/_item.html.erb
headmin-0.2.6 app/views/headmin/nav/_item.html.erb
headmin-0.2.5 app/views/headmin/nav/_item.html.erb
headmin-0.2.4 app/views/headmin/nav/_item.html.erb
headmin-0.2.3 app/views/headmin/nav/_item.html.erb
headmin-0.2.2 app/views/headmin/nav/_item.html.erb
headmin-0.2.1 app/views/headmin/nav/_item.html.erb
headmin-0.2.0 app/views/headmin/nav/_item.html.erb