mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 21:29:38 +02:00
Lazy load synth logos (#1731)
This commit is contained in:
parent
d428a1f954
commit
247d91b99d
4 changed files with 4 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
||||||
<%= turbo_frame_tag dom_id(holding) do %>
|
<%= turbo_frame_tag dom_id(holding) do %>
|
||||||
<div class="grid grid-cols-12 items-center text-gray-900 text-sm font-medium p-4">
|
<div class="grid grid-cols-12 items-center text-gray-900 text-sm font-medium p-4">
|
||||||
<div class="col-span-4 flex items-center gap-4">
|
<div class="col-span-4 flex items-center gap-4">
|
||||||
<%= image_tag "https://logo.synthfinance.com/ticker/#{holding.ticker}", class: "w-9 h-9 rounded-full" %>
|
<%= image_tag "https://logo.synthfinance.com/ticker/#{holding.ticker}", class: "w-9 h-9 rounded-full", loading: "lazy" %>
|
||||||
|
|
||||||
<div class="space-y-0.5">
|
<div class="space-y-0.5">
|
||||||
<%= link_to holding.name, account_holding_path(holding), data: { turbo_frame: :drawer }, class: "hover:underline" %>
|
<%= link_to holding.name, account_holding_path(holding), data: { turbo_frame: :drawer }, class: "hover:underline" %>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<%= tag.p @holding.ticker, class: "text-sm text-gray-500" %>
|
<%= tag.p @holding.ticker, class: "text-sm text-gray-500" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= image_tag "https://logo.synthfinance.com/ticker/#{@holding.ticker}", class: "w-9 h-9 rounded-full" %>
|
<%= image_tag "https://logo.synthfinance.com/ticker/#{@holding.ticker}", loading: "lazy", class: "w-9 h-9 rounded-full" %>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<details class="group space-y-2" open>
|
<details class="group space-y-2" open>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<div class="max-w-full">
|
<div class="max-w-full">
|
||||||
<%= content_tag :div, class: ["flex items-center gap-2"] do %>
|
<%= content_tag :div, class: ["flex items-center gap-2"] do %>
|
||||||
<% if transaction.merchant&.icon_url %>
|
<% if transaction.merchant&.icon_url %>
|
||||||
<%= image_tag transaction.merchant.icon_url, class: "w-6 h-6 rounded-full" %>
|
<%= image_tag transaction.merchant.icon_url, class: "w-6 h-6 rounded-full", loading: "lazy" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= render "shared/circle_logo", name: entry.display_name, size: "sm" %>
|
<%= render "shared/circle_logo", name: entry.display_name, size: "sm" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
<div class="flex items-center justify-center h-8 w-8 bg-blue-600/10 rounded-full bg-black/5">
|
<div class="flex items-center justify-center h-8 w-8 bg-blue-600/10 rounded-full bg-black/5">
|
||||||
<% if plaid_item.logo.attached? %>
|
<% if plaid_item.logo.attached? %>
|
||||||
<%= image_tag plaid_item.logo, class: "rounded-full h-full w-full" %>
|
<%= image_tag plaid_item.logo, class: "rounded-full h-full w-full", loading: "lazy" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="flex items-center justify-center">
|
<div class="flex items-center justify-center">
|
||||||
<%= tag.p plaid_item.name.first.upcase, class: "text-blue-600 text-xs font-medium" %>
|
<%= tag.p plaid_item.name.first.upcase, class: "text-blue-600 text-xs font-medium" %>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue