Show dominant colors in wishlisted record details page

This commit is contained in:
Claudio Ortolina
2025-06-07 19:41:11 +01:00
parent ccb3089ddf
commit 7efbbe0683
5 changed files with 25 additions and 10 deletions
@@ -8,7 +8,8 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
format_label: 1,
type_label: 1,
release_summary: 1,
artist_links: 1
artist_links: 1,
record_colors: 1
]
alias MusicLibrary.{Records, ScrobbleActivity}
@@ -17,12 +17,7 @@
{@record.title}
</h2>
<p class="mt-2 flex items-center text-sm leading-5 text-zinc-500 dark:text-zinc-400">
<span
:for={color <- @dominant_colors}
class="inline-block w-4 h-4 mr-1"
style={"background-color: #{color}"}
>
</span>
<.record_colors colors={@dominant_colors} />
<span class="ml-1">
{Records.Record.format_release_date(@record.release_date)} · {format_label(
@record.format