mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-08 15:05:22 +02:00
Sidebar cleanup
This commit is contained in:
parent
c988fdd2e1
commit
d297d78d17
3 changed files with 35 additions and 38 deletions
|
@ -21,7 +21,14 @@
|
|||
<%= image_tag "logo-color-dark.svg", class: 'w-auto h-5' %>
|
||||
</div>
|
||||
|
||||
<%= render "/layouts/shared/sidebar_portfolio" %>
|
||||
<%= render "shared/sidebar_portfolios" %>
|
||||
|
||||
<div class="mt-auto -mx-6">
|
||||
<a href="#" class="flex items-center px-6 py-3 text-sm font-semibold leading-6 text-gray-900 gap-x-4 hover:bg-gray-50">
|
||||
<span class="sr-only">Your profile</span>
|
||||
<span aria-hidden="true"><%= current_user.email %></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
<div class="space-y-3 -mx-2">
|
||||
<div class="p-3 rounded-md bg-gray-700 text-sm flex justify-between items-center">
|
||||
<span class="text-gray-50">Total portfolio</span>
|
||||
<span class="font-bold text-2xl text-white">
|
||||
$596,275
|
||||
</span>
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
<div class="p-3 -md text-sm flex justify-between items-center">
|
||||
<span class="text-white">Schwab</span>
|
||||
<span class="text-white font-medium tracking-tight">
|
||||
$36,418
|
||||
</span>
|
||||
</div>
|
||||
<div class="p-3 -md text-sm flex justify-between items-center">
|
||||
<span class="text-white">Robinhood</span>
|
||||
<span class="text-white font-medium tracking-tight">
|
||||
$36,418
|
||||
</span>
|
||||
</div>
|
||||
<div class="p-3 -md text-sm flex justify-between items-center">
|
||||
<span class="text-white">Crypto</span>
|
||||
<span class="text-white font-medium tracking-tight">
|
||||
$36,418
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<%= link_to new_portfolio_path, class: "text-sm flex items-center space-x-3 text-gray-100 hover:text-gray-50 py-3" do %>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" />
|
||||
</svg>
|
||||
|
||||
<span>New portfolio</span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
27
app/views/shared/_sidebar_portfolios.html.erb
Normal file
27
app/views/shared/_sidebar_portfolios.html.erb
Normal file
|
@ -0,0 +1,27 @@
|
|||
<div class="-mx-2 space-y-3">
|
||||
<div class="flex items-center justify-between p-3 text-sm bg-gray-700 rounded-md">
|
||||
<span class="text-gray-50">Total portfolio</span>
|
||||
<span class="text-2xl font-bold">
|
||||
$X
|
||||
</span>
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
<% current_user.portfolios.each do |portfolio| %>
|
||||
<div class="flex items-center justify-between p-3 text-sm -md">
|
||||
<span><%= portfolio.name %></span>
|
||||
<span class="font-medium tracking-tight">
|
||||
$X
|
||||
</span>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= link_to new_portfolio_path, class: "text-sm flex items-center space-x-3 text-gray-100 hover:text-gray-50 py-3" do %>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" />
|
||||
</svg>
|
||||
|
||||
<span>New portfolio</span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue