Display artist image in full when clicking on it

This commit is contained in:
Claudio Ortolina
2025-12-16 20:39:58 +03:00
parent 8e15b6eb57
commit aad5771259
2 changed files with 16 additions and 1 deletions
@@ -7,6 +7,7 @@ defmodule MusicLibraryWeb.ArtistComponents do
attr :image_hash, :string, required: true
attr :class, :string, required: false, default: nil
attr :width, :integer, default: nil
attr :rest, :global
def artist_image(assigns) do
payload =
@@ -21,6 +22,7 @@ defmodule MusicLibraryWeb.ArtistComponents do
src={~p"/assets/#{@payload}"}
alt={@artist.name}
onerror={"this.src = '" <> ~p"/images/cover-not-found.png" <> "';"}
{@rest}
/>
"""
end