Reformat artist show page
This commit is contained in:
@@ -36,81 +36,87 @@
|
|||||||
</.async_result>
|
</.async_result>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="columns-2 mt-4">
|
<div class="mt-4 md:grid md:grid-cols-5 md:gap-2">
|
||||||
<.async_result :let={artist_info} assign={@artist_info}>
|
<div class="col-span-1 mt-4">
|
||||||
<:loading>
|
<.async_result :let={artist_info} assign={@artist_info}>
|
||||||
<div class="mt-4 text-sm leading-5 text-zinc-500 dark:text-zinc-400">
|
<:loading>
|
||||||
{gettext("Loading biography")}
|
<div class="mt-4 text-sm leading-5 text-zinc-500 dark:text-zinc-400">
|
||||||
</div>
|
{gettext("Loading biography")}
|
||||||
</:loading>
|
</div>
|
||||||
<:failed :let={_failure}>
|
</:loading>
|
||||||
<div class="mt-4 text-sm leading-5 text-zinc-500 dark:text-zinc-400">
|
<:failed :let={_failure}>
|
||||||
<.icon
|
<div class="mt-4 text-sm leading-5 text-zinc-500 dark:text-zinc-400">
|
||||||
name="hero-exclamation-triangle"
|
<.icon
|
||||||
class="-mt-1 mr-1 h-5 w-5"
|
name="hero-exclamation-triangle"
|
||||||
aria-hidden="true"
|
class="-mt-1 mr-1 h-5 w-5"
|
||||||
data-slot="icon"
|
aria-hidden="true"
|
||||||
/>
|
data-slot="icon"
|
||||||
{gettext("Error loading biography")}
|
/>
|
||||||
</div>
|
{gettext("Error loading biography")}
|
||||||
</:failed>
|
</div>
|
||||||
<details
|
</:failed>
|
||||||
:if={artist_info.bio !== ""}
|
<details
|
||||||
class="text-sm leading-5 text-zinc-500 dark:text-zinc-400"
|
:if={artist_info.bio !== ""}
|
||||||
>
|
class="text-sm leading-5 text-zinc-500 dark:text-zinc-400"
|
||||||
<summary class="text-sm mb-4">{gettext("Biography")}</summary>
|
|
||||||
{render_bio(@artist_info.result.bio)}
|
|
||||||
</details>
|
|
||||||
</.async_result>
|
|
||||||
|
|
||||||
<.async_result :let={similar_artists} assign={@similar_artists}>
|
|
||||||
<:loading>
|
|
||||||
<div class="mt-4 text-sm leading-5 text-zinc-500 dark:text-zinc-400">
|
|
||||||
{gettext("Loading similar artists")}
|
|
||||||
</div>
|
|
||||||
</:loading>
|
|
||||||
<:failed :let={_failure}>
|
|
||||||
<div class="mt-4 text-sm leading-5 text-zinc-500 dark:text-zinc-400">
|
|
||||||
<.icon
|
|
||||||
name="hero-exclamation-triangle"
|
|
||||||
class="-mt-1 mr-1 h-5 w-5"
|
|
||||||
aria-hidden="true"
|
|
||||||
data-slot="icon"
|
|
||||||
/>
|
|
||||||
{gettext("Error loading similar artists")}
|
|
||||||
</div>
|
|
||||||
</:failed>
|
|
||||||
<details
|
|
||||||
:if={similar_artists !== []}
|
|
||||||
class="text-sm leading-5 text-zinc-500 dark:text-zinc-400"
|
|
||||||
>
|
|
||||||
<summary class="text-sm mb-4">{gettext("Similar artists")}</summary>
|
|
||||||
<.link
|
|
||||||
:for={artist <- similar_artists}
|
|
||||||
class="text-zinc-700 hover:text-zinc-500 dark:text-zinc-400 dark:hover:text-zinc-300"
|
|
||||||
patch={~p"/artists/#{artist.musicbrainz_id}"}
|
|
||||||
>
|
>
|
||||||
{artist.name}
|
<summary class="text-sm mb-4">{gettext("Biography")}</summary>
|
||||||
</.link>
|
{render_bio(@artist_info.result.summary)}
|
||||||
</details>
|
</details>
|
||||||
</.async_result>
|
</.async_result>
|
||||||
|
|
||||||
|
<.async_result :let={similar_artists} assign={@similar_artists}>
|
||||||
|
<:loading>
|
||||||
|
<div class="mt-4 text-sm leading-5 text-zinc-500 dark:text-zinc-400">
|
||||||
|
{gettext("Loading similar artists")}
|
||||||
|
</div>
|
||||||
|
</:loading>
|
||||||
|
<:failed :let={_failure}>
|
||||||
|
<div class="mt-4 text-sm leading-5 text-zinc-500 dark:text-zinc-400">
|
||||||
|
<.icon
|
||||||
|
name="hero-exclamation-triangle"
|
||||||
|
class="-mt-1 mr-1 h-5 w-5"
|
||||||
|
aria-hidden="true"
|
||||||
|
data-slot="icon"
|
||||||
|
/>
|
||||||
|
{gettext("Error loading similar artists")}
|
||||||
|
</div>
|
||||||
|
</:failed>
|
||||||
|
<details
|
||||||
|
:if={similar_artists !== []}
|
||||||
|
class="text-sm leading-5 text-zinc-500 dark:text-zinc-400"
|
||||||
|
>
|
||||||
|
<summary class="text-sm mb-4">{gettext("Similar artists")}</summary>
|
||||||
|
<ul>
|
||||||
|
<li :for={artist <- similar_artists}>
|
||||||
|
<.link
|
||||||
|
class="text-zinc-700 hover:text-zinc-500 dark:text-zinc-400 dark:hover:text-zinc-300"
|
||||||
|
patch={~p"/artists/#{artist.musicbrainz_id}"}
|
||||||
|
>
|
||||||
|
{artist.name}
|
||||||
|
</.link>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</details>
|
||||||
|
</.async_result>
|
||||||
|
</div>
|
||||||
|
<div class="col-span-4">
|
||||||
|
<.record_grid
|
||||||
|
:if={@collection_records_count > 0}
|
||||||
|
title={gettext("Collection")}
|
||||||
|
id="collection"
|
||||||
|
records={@streams.collection_records}
|
||||||
|
records_count={@collection_records_count}
|
||||||
|
record_path={fn record -> ~p"/collection/#{record}" end}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<.record_grid
|
||||||
|
:if={@wishlist_records_count > 0}
|
||||||
|
title={gettext("Wishlist")}
|
||||||
|
id="wishlist"
|
||||||
|
records={@streams.wishlist_records}
|
||||||
|
records_count={@wishlist_records_count}
|
||||||
|
record_path={fn record -> ~p"/wishlist/#{record}" end}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<.record_grid
|
|
||||||
:if={@collection_records_count > 0}
|
|
||||||
title={gettext("Collection")}
|
|
||||||
id="collection"
|
|
||||||
records={@streams.collection_records}
|
|
||||||
records_count={@collection_records_count}
|
|
||||||
record_path={fn record -> ~p"/collection/#{record}" end}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<.record_grid
|
|
||||||
:if={@wishlist_records_count > 0}
|
|
||||||
title={gettext("Wishlist")}
|
|
||||||
id="wishlist"
|
|
||||||
records={@streams.wishlist_records}
|
|
||||||
records_count={@wishlist_records_count}
|
|
||||||
record_path={fn record -> ~p"/wishlist/#{record}" end}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ msgid "Choose a value"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/components/layouts/app.html.heex:14
|
#: lib/music_library_web/components/layouts/app.html.heex:14
|
||||||
#: lib/music_library_web/live/artist_live/show.html.heex:101
|
#: lib/music_library_web/live/artist_live/show.html.heex:105
|
||||||
#: lib/music_library_web/live/collection_live/index.ex:157
|
#: lib/music_library_web/live/collection_live/index.ex:157
|
||||||
#: lib/music_library_web/live/collection_live/show.ex:117
|
#: lib/music_library_web/live/collection_live/show.ex:117
|
||||||
#: lib/music_library_web/live/collection_live/show.ex:134
|
#: lib/music_library_web/live/collection_live/show.ex:134
|
||||||
@@ -302,7 +302,7 @@ msgid "Welcome to your Music Library"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/components/layouts/app.html.heex:20
|
#: lib/music_library_web/components/layouts/app.html.heex:20
|
||||||
#: lib/music_library_web/live/artist_live/show.html.heex:110
|
#: lib/music_library_web/live/artist_live/show.html.heex:114
|
||||||
#: lib/music_library_web/live/wishlist_live/index.ex:159
|
#: lib/music_library_web/live/wishlist_live/index.ex:159
|
||||||
#: lib/music_library_web/live/wishlist_live/show.ex:137
|
#: lib/music_library_web/live/wishlist_live/show.ex:137
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
@@ -436,12 +436,12 @@ msgstr ""
|
|||||||
msgid "View details"
|
msgid "View details"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/artist_live/show.html.heex:61
|
#: lib/music_library_web/live/artist_live/show.html.heex:62
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Biography"
|
msgid "Biography"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/artist_live/show.html.heex:43
|
#: lib/music_library_web/live/artist_live/show.html.heex:44
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Loading biography"
|
msgid "Loading biography"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -486,7 +486,7 @@ msgstr ""
|
|||||||
msgid "Records"
|
msgid "Records"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/artist_live/show.html.heex:54
|
#: lib/music_library_web/live/artist_live/show.html.heex:55
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Error loading biography"
|
msgid "Error loading biography"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -672,17 +672,17 @@ msgstr ""
|
|||||||
msgid "New"
|
msgid "New"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/artist_live/show.html.heex:80
|
#: lib/music_library_web/live/artist_live/show.html.heex:81
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Error loading similar artists"
|
msgid "Error loading similar artists"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/artist_live/show.html.heex:69
|
#: lib/music_library_web/live/artist_live/show.html.heex:70
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Loading similar artists"
|
msgid "Loading similar artists"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/artist_live/show.html.heex:87
|
#: lib/music_library_web/live/artist_live/show.html.heex:88
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Similar artists"
|
msgid "Similar artists"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
Reference in New Issue
Block a user