mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 22:34:47 +00:00
* Translate main navigation labels Move main nav item names to layout locale keys. * Use the interpolation that corresponds with the view name
37 lines
1.5 KiB
Plaintext
37 lines
1.5 KiB
Plaintext
<%# locals: path, direction, title %>
|
|
<%= link_to path, class: "hidden md:flex w-full bg-container hover:bg-container-inset rounded-xl border border-alpha-black-25 shadow-xs p-4 items-center justify-between" do %>
|
|
<% if direction == 'previous' %>
|
|
<%= icon("arrow-left") %>
|
|
<% end %>
|
|
<div class="<%= "grow" if direction == "next" %> <%= "text-right" if direction == "previous" %>">
|
|
<span class="block text-sm text-secondary"><%= t(".#{direction}") %></span>
|
|
<span class="block text-sm font-medium text-primary"><%= title %></span>
|
|
</div>
|
|
<% if direction == 'next' %>
|
|
<%= icon("arrow-right") %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<%# Mobile version %>
|
|
<%= link_to path, class: "md:hidden w-full bg-container hover:bg-container-inset rounded-xl border border-alpha-black-25 shadow-xs py-3 px-4" do %>
|
|
<div class="flex items-center justify-between">
|
|
<% if direction == 'previous' %>
|
|
<div class="flex items-center gap-3">
|
|
<%= icon("arrow-left") %>
|
|
<span class="text-sm text-secondary"><%= t("settings.settings_nav_link_large.previous") %></span>
|
|
</div>
|
|
<div>
|
|
<span class="text-sm font-medium text-primary"><%= title %></span>
|
|
</div>
|
|
<% else %>
|
|
<div>
|
|
<span class="text-sm text-secondary"><%= t("settings.settings_nav_link_large.next") %></span>
|
|
</div>
|
|
<div class="flex items-center gap-3">
|
|
<span class="text-sm font-medium text-primary"><%= title %></span>
|
|
<%= icon("arrow-right") %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|