mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-09 23:45:21 +02:00
WIP
This commit is contained in:
parent
2e1ab8101f
commit
53c8259a72
3 changed files with 41 additions and 3 deletions
|
@ -40,7 +40,17 @@ module SettingsHelper
|
|||
previous_setting = adjacent_setting(request.path, -1)
|
||||
next_setting = adjacent_setting(request.path, 1)
|
||||
|
||||
content_tag :div, class: "flex justify-between gap-4" do
|
||||
content_tag :div, class: "hidden md:flex flex-row justify-between gap-4" do
|
||||
concat(previous_setting)
|
||||
concat(next_setting)
|
||||
end
|
||||
end
|
||||
|
||||
def settings_nav_footer_mobile
|
||||
previous_setting = adjacent_setting(request.path, -1)
|
||||
next_setting = adjacent_setting(request.path, 1)
|
||||
|
||||
content_tag :div, class: "md:hidden flex flex-col gap-4" do
|
||||
concat(previous_setting)
|
||||
concat(next_setting)
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<%= render "settings/settings_nav" %>
|
||||
</div>
|
||||
|
||||
<main class="px-4 pt-2 pb-24 md:py-4 md:px-10 grow flex h-full overflow-y-auto">
|
||||
<main class="px-4 pt-2 md:py-4 md:px-10 grow flex h-full overflow-y-auto">
|
||||
<div class="relative max-w-4xl mx-auto flex flex-col w-full h-full">
|
||||
<div class="grow space-y-4 overflow-y-auto -mx-1 px-1 pb-12">
|
||||
<% if content_for?(:breadcrumbs) %>
|
||||
|
@ -20,6 +20,7 @@
|
|||
<% end %>
|
||||
|
||||
<%= yield %>
|
||||
<%= settings_nav_footer_mobile %>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<%# locals: path, direction, title %>
|
||||
<%= link_to path, class: "w-full bg-container hover:bg-container-inset rounded-xl border border-alpha-black-25 shadow-xs p-4 flex items-center justify-between" do %>
|
||||
<%= 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' %>
|
||||
<div class="w-5 h-5 text-secondary">
|
||||
<%= lucide_icon("arrow-left") %>
|
||||
|
@ -15,3 +15,30 @@
|
|||
</div>
|
||||
<% 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">
|
||||
<div class="w-5 h-5 text-secondary">
|
||||
<%= lucide_icon("arrow-left") %>
|
||||
</div>
|
||||
<span class="text-sm text-secondary">Back</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="text-sm font-medium text-primary"><%= title %></span>
|
||||
</div>
|
||||
<% else %>
|
||||
<div>
|
||||
<span class="text-sm text-secondary">Next</span>
|
||||
</div>
|
||||
<div class="flex items-center gap-3">
|
||||
<span class="text-sm font-medium text-primary"><%= title %></span>
|
||||
<div class="w-5 h-5 text-secondary">
|
||||
<%= lucide_icon("arrow-right") %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue