2024-02-02 09:05:04 -06:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html class="bg-offwhite">
|
|
|
|
<head>
|
|
|
|
<title><%= content_for(:title) || "Maybe" %></title>
|
|
|
|
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
|
|
<meta name="apple-mobile-web-app-title" content="Maybe">
|
2024-02-02 16:15:44 +00:00
|
|
|
|
2024-02-02 09:05:04 -06:00
|
|
|
<%= csrf_meta_tags %>
|
|
|
|
<%= csp_meta_tag %>
|
|
|
|
|
|
|
|
<link rel="manifest" href="/manifest.json">
|
|
|
|
<link rel="icon" href="/icon.png" type="image/png">
|
|
|
|
<link rel="icon" href="/icon.svg" type="image/svg+xml">
|
|
|
|
<link rel="apple-touch-icon" href="/icon.png">
|
|
|
|
<%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>
|
|
|
|
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
|
|
|
<%= javascript_importmap_tags %>
|
|
|
|
<%= hotwire_livereload_tags if Rails.env.development? %>
|
2024-02-02 16:15:44 +00:00
|
|
|
|
|
|
|
<%= turbo_refreshes_with method: :morph, scroll: :preserve %>
|
|
|
|
<%= yield :head %>
|
2024-02-02 09:05:04 -06:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body class="h-full">
|
|
|
|
<div class="flex">
|
|
|
|
<div class="flex-col p-5 min-w-80">
|
|
|
|
<div class="flex items-center justify-between">
|
|
|
|
<%= link_to root_path do %>
|
|
|
|
<%= image_tag 'logo.svg', alt: 'Maybe' %>
|
|
|
|
<% end %>
|
2024-02-05 19:36:32 +01:00
|
|
|
<div class="relative cursor-pointer" data-controller="dropdown">
|
2024-02-02 09:05:04 -06:00
|
|
|
<div class="flex" data-action="click->dropdown#toggleMenu">
|
2024-02-05 10:36:46 +11:00
|
|
|
<div class="mr-1.5 text-white w-8 h-8 bg-gray-400 rounded-full flex items-center justify-center text-lg uppercase"><%= Current.user.email.first %></div>
|
2024-02-02 09:05:04 -06:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="absolute z-10 hidden w-screen px-2 mt-2 -translate-x-1/2 left-1/2 max-w-min" data-dropdown-target="menu">
|
|
|
|
<div class="w-48 px-3 text-sm font-semibold leading-6 text-gray-900 bg-white shadow-lg shrink rounded-xl ring-1 ring-gray-900/5">
|
2024-02-05 22:19:23 +08:00
|
|
|
<%= link_to "Settings", edit_settings_path, class: 'block p-2 hover:text-gray-600' %>
|
2024-02-02 09:05:04 -06:00
|
|
|
<%= button_to "Log Out", session_path, method: :delete, class: 'block p-2 hover:text-gray-600' %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<nav>
|
2024-02-10 19:12:20 -06:00
|
|
|
<ul class="mt-6 space-y">
|
2024-02-02 09:05:04 -06:00
|
|
|
<li>
|
2024-02-11 18:47:58 +00:00
|
|
|
<%= sidebar_link_to t('.dashboard'), root_path, icon: 'layout-grid' %>
|
2024-02-02 09:05:04 -06:00
|
|
|
</li>
|
2024-02-10 19:12:20 -06:00
|
|
|
<li>
|
2024-02-11 18:47:58 +00:00
|
|
|
<%= sidebar_link_to t('.accounts'), accounts_path, icon: 'layers' %>
|
2024-02-10 19:12:20 -06:00
|
|
|
</li>
|
|
|
|
<li>
|
2024-02-11 18:47:58 +00:00
|
|
|
<%= sidebar_link_to t('.transactions'), "#", icon: 'credit-card' %>
|
2024-02-10 19:12:20 -06:00
|
|
|
</li>
|
2024-02-02 09:05:04 -06:00
|
|
|
</ul>
|
|
|
|
</nav>
|
2024-02-02 11:45:06 -06:00
|
|
|
<div class="flex flex-col mt-6">
|
2024-02-02 09:05:04 -06:00
|
|
|
<div class="flex items-center justify-between">
|
2024-02-08 21:46:27 +00:00
|
|
|
<%= link_to accounts_path, class: 'text-xs uppercase text-[#737373] font-bold tracking-wide' do%>
|
2024-02-06 22:50:11 +03:00
|
|
|
<%= t('.accounts') %>
|
|
|
|
<% end %>
|
2024-02-08 10:46:05 -06:00
|
|
|
<%= link_to new_account_path, class: 'block hover:bg-gray-100 p-2 text-sm font-semibold text-gray-900 flex items-center rounded', title: t('.new_account'), data: { turbo_frame: "modal" } do %>
|
2024-02-10 19:39:18 -06:00
|
|
|
<%= lucide_icon("plus", class: "w-5 h-5 text-gray-500") %>
|
2024-02-02 09:05:04 -06:00
|
|
|
<% end %>
|
|
|
|
</div>
|
2024-02-08 10:46:05 -06:00
|
|
|
|
2024-02-02 11:45:06 -06:00
|
|
|
|
2024-02-08 21:46:27 +00:00
|
|
|
<%= link_to new_account_path, class: "flex items-center gap-4 px-2 py-3 mb-1 text-[#737373] text-sm font-medium rounded-[10px] hover:bg-[#f2f2f2]", data: { turbo_frame: "modal" } do %>
|
|
|
|
<%= lucide_icon("plus", class: "w-5 h-5") %>
|
|
|
|
<p><%= t('.new_account') %></p>
|
|
|
|
<% end %>
|
|
|
|
|
2024-02-09 14:26:54 +00:00
|
|
|
<% Accountable.types.each do |type| %>
|
|
|
|
<%= render 'accounts/account_list', type: Accountable.from_type(type) %>
|
2024-02-08 21:46:27 +00:00
|
|
|
<% end %>
|
2024-02-02 09:05:04 -06:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<main class="flex-grow py-5 pr-5">
|
|
|
|
<%= yield %>
|
|
|
|
</main>
|
|
|
|
</div>
|
2024-02-08 10:46:05 -06:00
|
|
|
<%= turbo_frame_tag "modal" %>
|
2024-02-02 09:05:04 -06:00
|
|
|
</body>
|
|
|
|
</html>
|