Restyle records list to work better on mobile

This commit is contained in:
Claudio Ortolina
2024-09-27 10:25:09 +01:00
parent ae45ab44df
commit 92de18e493
2 changed files with 8 additions and 8 deletions
@@ -24,13 +24,13 @@
row_click={fn {_id, record} -> JS.navigate(~p"/records/#{record}") end}
>
<:col :let={{_id, record}} label="Image">
<img class="max-w-16" src={~p"/images/#{record.id}"} alt={record.title} />
<img class="max-w-16 rounded-lg shadow" src={~p"/images/#{record.id}"} alt={record.title} />
</:col>
<:col :let={{_id, record}} label="Artists">
<%= Enum.map(record.artists, fn a -> a.name end) %>
<:col :let={{_id, record}} label="Record">
<p class="text-sm max-sm:text-xs"><%= Enum.map(record.artists, fn a -> a.name end) %></p>
<p class="text-base font-semibold text-wrap max-sm:text-xs"><%= record.title %></p>
<p class="text-sm max-sm:text-xs"><%= record.year %></p>
</:col>
<:col :let={{_id, record}} label="Title"><%= record.title %></:col>
<:col :let={{_id, record}} label="Year"><%= record.year %></:col>
<:action :let={{_id, record}}>
<.link href={musicbrainz_url(record)} target=".blank">MB</.link>
</:action>