mirror of
https://github.com/ubicloud/ubicloud.git
synced 2025-10-07 07:11:58 +08:00
Currently, herb/formatter has at least 4 bugs the prevent us from switching to it (https://github.com/marcoroth/herb/issues 476, 477, 478, and 479). This includes manual fixes for each issue. herb/formatter also introduces a rubocop violation for the Layout/AssignmentIndentation cop. This disables that cop.
22 lines
923 B
Text
22 lines
923 B
Text
<%# locals: (tabs:) %>
|
|
|
|
<div class="sm:block mb-6">
|
|
<nav
|
|
class="isolate flex divide-x divide-gray-200 rounded-lg shadow"
|
|
aria-label="Tabs"
|
|
>
|
|
<% tabs.each_with_index do |(label, url, active), i| %>
|
|
<% active = (request.path == url) if active.nil? %>
|
|
<a
|
|
href="<%= url %>"
|
|
class="group flex items-center justify-center relative min-w-0 flex-1 overflow-hidden <%= (i == 0) ? "rounded-l-lg" : ((i == tabs.size - 1) ? "rounded-r-lg" : "") %> px-4 py-4 text-center text-sm bg-white font-medium focus:z-10 <%= active ? "text-orange-600 hover:text-orange-700 hover:bg-orange-50" : "text-gray-500 hover:text-orange-500 hover:bg-orange-50" %>"
|
|
>
|
|
<span><%= label %></span>
|
|
<span
|
|
aria-hidden="true"
|
|
class="absolute inset-x-0 bottom-0 h-0.5 <%= active ? "bg-orange-600" : "bg-transparent" %>"
|
|
></span>
|
|
</a>
|
|
<% end %>
|
|
</nav>
|
|
</div>
|