1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-02 20:15:22 +02:00

Refactor placeholder logo into common controller (#673)

This can be updated to redirect/pull from third party sources in future,
with the option of always falling back to the placeholder if there are
any failures.
This commit is contained in:
Josh Brown 2024-04-25 15:32:45 +01:00 committed by GitHub
parent 5a5f13b46b
commit be21d2b4fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 50 additions and 24 deletions

View file

@ -0,0 +1,21 @@
<svg
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 32 32"
aria-hidden="true">
<g>
<rect width="100%" height="100%" rx="50%" fill="<%= accountable_color(@account.accountable_type) %>" opacity="0.1" />
<text
x="50%"
y="50%"
fill="<%= accountable_color(@account.accountable_type) %>"
text-anchor="middle"
dy="0.35em"
font-family="ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji"
font-size="16"
font-weight="400">
<%= @account.name[0].upcase %>
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 653 B

View file

@ -2,9 +2,7 @@
<div class="space-y-4">
<div class="flex justify-between items-center">
<div class="flex items-center gap-3">
<div class="bg-green-600/10 rounded-full h-8 w-8 flex items-center justify-center">
<span class="text-green-600"><%= @account.name[0].upcase %></span>
</div>
<%= image_tag account_logo_url(@account), class: "w-8 h-8" %>
<h2 class="font-medium text-xl"><%= @account.name %></h2>
</div>
<div class="flex items-center gap-3">