Skip to content

Commit

Permalink
Adding lvl metadata to make this suck less (#1788)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeregrine authored Aug 20, 2024
1 parent c116d73 commit 674ecb3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions partials/_breadcrumbs.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<nav aria-label="Breadcrumb" class="mb-11 flex items-center space-x-2 text-sm font-[550] text-gray-500">
<a href="/docs/" class="hover:text-violet-600 transition-colors truncate">Docs</a>
<%
<%
segments = current_page.request_path.split('/').drop(2)
segments.each_with_index do |segment, index|
path = "/docs/#{segments.take(index + 1).join('/')}"
Expand All @@ -11,7 +11,7 @@
end
is_last = index == segments.size - 1
%>
<span class="flex items-center truncate">
<span data-lvl="<%= index %>" class="flex items-center truncate">
<svg class="w-4 h-4 text-gray-500/50 shrink-0" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
</svg>
Expand All @@ -22,4 +22,4 @@
<% end %>
</span>
<% end %>
</nav>
</nav>

0 comments on commit 674ecb3

Please sign in to comment.