Render external links with summary
This commit is contained in:
@@ -140,13 +140,11 @@ defmodule MusicLibraryWeb.CoreComponents do
|
||||
|
||||
def external_links(assigns) do
|
||||
~H"""
|
||||
<dt
|
||||
:if={@external_links != []}
|
||||
class="mt-4 text-sm font-medium leading-6 text-zinc-900 dark:text-zinc-400"
|
||||
>
|
||||
{gettext("External links")}
|
||||
</dt>
|
||||
<dd class="mt-4 space-y-2">
|
||||
<details class="mt-4 text-zinc-700 hover:text-zinc-500 dark:text-zinc-400 dark:hover:text-zinc-300">
|
||||
<summary class="text-xs sm:text-sm font-medium cursor-pointer">
|
||||
{gettext("External Links")}
|
||||
</summary>
|
||||
<div class="mt-4 space-y-2">
|
||||
<Fluxon.Components.Button.button
|
||||
:for={external_link <- @external_links}
|
||||
href={external_link.url}
|
||||
@@ -166,7 +164,8 @@ defmodule MusicLibraryWeb.CoreComponents do
|
||||
{external_link.name}
|
||||
</span>
|
||||
</Fluxon.Components.Button.button>
|
||||
</dd>
|
||||
</div>
|
||||
</details>
|
||||
"""
|
||||
end
|
||||
|
||||
|
||||
@@ -1471,5 +1471,5 @@ msgstr ""
|
||||
|
||||
#: lib/music_library_web/components/core_components.ex
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "External links"
|
||||
msgid "External Links"
|
||||
msgstr ""
|
||||
|
||||
@@ -1470,6 +1470,6 @@ msgid "You need to connect your Last.fm account to scrobble. Please set up your
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/components/core_components.ex
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "External links"
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "External Links"
|
||||
msgstr ""
|
||||
|
||||
Reference in New Issue
Block a user