Simplify record grid markup

This commit is contained in:
Claudio Ortolina
2025-11-06 14:54:29 +00:00
parent ca81bdaac9
commit 794ff004d7
@@ -212,7 +212,6 @@ defmodule MusicLibraryWeb.RecordComponents do
{ngettext("1 record", "%{count} records", @records_count)} {ngettext("1 record", "%{count} records", @records_count)}
</span> </span>
</header> </header>
<%!-- TODO: replace with OSS version --%>
<ul <ul
id={@id} id={@id}
phx-update="stream" phx-update="stream"
@@ -225,14 +224,13 @@ defmodule MusicLibraryWeb.RecordComponents do
]} ]}
> >
<li :for={{id, record} <- @records} id={id} class="relative"> <li :for={{id, record} <- @records} id={id} class="relative">
<div class="overflow-hidden rounded-lg bg-zinc-100 focus-within:ring-2 focus-within:ring-zinc-500 focus-within:ring-offset-2 focus-within:ring-offset-zinc-100">
<div <div
class="relative cursor-pointer" class="relative cursor-pointer"
phx-click={JS.navigate(@record_show_path.(record))} phx-click={JS.navigate(@record_show_path.(record))}
> >
<.record_cover <.record_cover
record={record} record={record}
class="aspect-square object-cover hover:opacity-85" class="aspect-square rounded-lg hover:opacity-85"
width={460} width={460}
/> />
<span <span
@@ -291,7 +289,6 @@ defmodule MusicLibraryWeb.RecordComponents do
</.dropdown> </.dropdown>
</div> </div>
</div> </div>
</div>
<div class="mt-2"> <div class="mt-2">
<h1 <h1
:if={@display_artist_names} :if={@display_artist_names}