a11yist/app/views/layouts/_sidebar.html.erb
david c35c7da6e0
Some checks failed
/ Run tests (push) Successful in 2m51s
/ Run system tests (push) Failing after 3m29s
/ Build, push and deploy image (push) Has been cancelled
Migrate to Rais 8.0
- Remove all Rodauth stuff and implement simple custom auth
- Migrate from sprockets to propshaft, hack some bootstrap stuff
2024-11-08 22:05:31 +01:00

32 lines
No EOL
1.5 KiB
Text

<div class="col col-auto px-0 d-none d-md-block">
<div id="sidebar" class="collapse collapse-horizontal show border-0">
<div id="sidebar-nav" class="list-group border-0 rounded-0 text-sm-start" style="min-height: 90vh">
<% if @sidebar_items %>
<% @sidebar_items.each do |sidebar_item| %>
<% if sidebar_item[:method].present? && sidebar_item[:method] != :get %>
<%= button_to(sidebar_item[:path], method: sidebar_item[:method], class: "list-group-item border-0 d-inline-block text-truncate") do %>
<% if sidebar_item[:icon] %>
<span aria-hidden="true" class="bi-<%= sidebar_item[:icon] %>"></span>
<% end %>
<%= sidebar_item[:label] %>
<% end %>
<% else %>
<a class="list-group-item border-0 d-inline-block text-truncate <%= (sidebar_item[:active] || @nav_path.to_s == sidebar_item[:path].to_s) && "active" %>" <%= @nav_path.to_s == sidebar_item[:path].to_s && "aria-current=\"page\"" %> href="<%= url_for(sidebar_item[:path]) %>">
<% if sidebar_item[:icon] %>
<span aria-hidden="true" class="bi-<%= sidebar_item[:icon] %>"></span>
<% end %>
<%= sidebar_item[:label] %>
</a>
<% end %>
<% end %>
<!--div class="mt-auto ms-auto me-2">
<%= link_to("hide") do %>
<span class="bi-chevron-left"></span>
<% end %>
</div-->
<% else %>
<div class="me-auto"></div>
<% end %>
</div>
</div>
</div>