mirror of
https://github.com/we-promise/sure.git
synced 2026-09-04 14:21:23 +00:00
* fix(app): set breadcrumbs for changelog and feedback pages * feat(test): add test to assert breadcrumbs * fix(test): remove changes * feat(app): update breadcrumbs to use semantic nav element * feat(test): add breadcrumb assertions to changelog and feedback pages * fix(app): replace breadcrumb nav element with div containing data-breadcrumbs attribute
18 lines
628 B
ERB
18 lines
628 B
ERB
<%# locals: (breadcrumbs:) %>
|
|
|
|
<div data-breadcrumbs class="py-2 flex items-center gap-2">
|
|
<% breadcrumbs.each_with_index do |(name, path), index| %>
|
|
<% if index > 0 %>
|
|
<%= icon("chevron-right", color: "gray", size: "sm") %>
|
|
<% end %>
|
|
|
|
<% if path.present? && index < breadcrumbs.size - 1 %>
|
|
<%= link_to name, path, class: "text-sm text-secondary font-medium" %>
|
|
<% elsif index == breadcrumbs.size - 1 %>
|
|
<span class="text-primary font-medium text-sm"><%= name %></span>
|
|
<% else %>
|
|
<span class="text-sm text-secondary font-medium"><%= name %></span>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|