mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 05:25:24 +02:00
Categories, tags, merchants, and menus improvements (#1135)
This commit is contained in:
parent
f82ce59dad
commit
38c2b4670c
22 changed files with 250 additions and 210 deletions
11
app/views/shared/_color_avatar.html.erb
Normal file
11
app/views/shared/_color_avatar.html.erb
Normal file
|
@ -0,0 +1,11 @@
|
|||
<%# locals: (name: nil, color: "#000") %>
|
||||
|
||||
<% letter = name&.first || "?" %>
|
||||
|
||||
<% background_color = "color-mix(in srgb, #{color} 5%, white)" %>
|
||||
<% border_color = "color-mix(in srgb, #{color} 10%, white)" %>
|
||||
<span data-color-avatar-target="avatar"
|
||||
class="w-8 h-8 flex items-center justify-center rounded-full"
|
||||
style="background-color: <%= background_color %>; border-color: <%= border_color %>; color: <%= color %>">
|
||||
<%= letter.upcase %>
|
||||
</span>
|
Loading…
Add table
Add a link
Reference in a new issue