From 18937865bf05ad1794932b333cc0a4a2736980c2 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Tue, 15 Oct 2024 15:19:40 +0100 Subject: [PATCH] Improve record details styling --- .../components/core_components.ex | 10 +++++----- .../live/record_live/show.html.heex | 18 +++++++++++------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/music_library_web/components/core_components.ex b/lib/music_library_web/components/core_components.ex index 0ca996f2..6825d87d 100644 --- a/lib/music_library_web/components/core_components.ex +++ b/lib/music_library_web/components/core_components.ex @@ -431,15 +431,15 @@ defmodule MusicLibraryWeb.CoreComponents do @actions != [] && "sm:flex sm:items-center sm:justify-between sm:gap-6 mb-2", @class ]}> -
-

+
+

<%= render_slot(@inner_block) %>

-

+

<%= render_slot(@subtitle) %> -

+

-
<%= render_slot(@actions) %>
+
<%= render_slot(@actions) %>
""" end diff --git a/lib/music_library_web/live/record_live/show.html.heex b/lib/music_library_web/live/record_live/show.html.heex index cbe17c40..3f214419 100644 --- a/lib/music_library_web/live/record_live/show.html.heex +++ b/lib/music_library_web/live/record_live/show.html.heex @@ -1,6 +1,8 @@ <.header> - <%= @record.title %> - <:subtitle><%= format_artist_names(@record.artists) %> + <%= format_artist_names(@record.artists) %> + <:subtitle> + <%= @record.title %> + <:actions> <.link patch={~p"/records/#{@record}/show/edit"} phx-click={JS.push_focus()}> <.button>Edit Metadata @@ -11,17 +13,17 @@ -
- +
+
{@record.title} <%= Records.Record.format_short_label(@record.format) %> - +
<.list> <:item title="Type"> @@ -50,7 +52,9 @@
-<.back navigate={@back_url}>Back to records +
+ <.back navigate={@back_url}>Back to records +
<.modal :if={@live_action == :edit}