From 92de18e49308970ebf0774c2379359f087f42308 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Fri, 27 Sep 2024 10:25:09 +0100 Subject: [PATCH] Restyle records list to work better on mobile --- lib/music_library_web/components/core_components.ex | 6 +++--- lib/music_library_web/live/record_live/index.html.heex | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/music_library_web/components/core_components.ex b/lib/music_library_web/components/core_components.ex index 7107ee14..829683a5 100644 --- a/lib/music_library_web/components/core_components.ex +++ b/lib/music_library_web/components/core_components.ex @@ -473,8 +473,8 @@ defmodule MusicLibraryWeb.CoreComponents do end ~H""" -
- +
+
@@ -506,7 +506,7 @@ defmodule MusicLibraryWeb.CoreComponents do <%= render_slot(action, @row_item.(row)) %> diff --git a/lib/music_library_web/live/record_live/index.html.heex b/lib/music_library_web/live/record_live/index.html.heex index e700a173..8c53511e 100644 --- a/lib/music_library_web/live/record_live/index.html.heex +++ b/lib/music_library_web/live/record_live/index.html.heex @@ -24,13 +24,13 @@ row_click={fn {_id, record} -> JS.navigate(~p"/records/#{record}") end} > <:col :let={{_id, record}} label="Image"> - {record.title} + {record.title} - <:col :let={{_id, record}} label="Artists"> - <%= Enum.map(record.artists, fn a -> a.name end) %> + <:col :let={{_id, record}} label="Record"> +

<%= Enum.map(record.artists, fn a -> a.name end) %>

+

<%= record.title %>

+

<%= record.year %>

- <:col :let={{_id, record}} label="Title"><%= record.title %> - <:col :let={{_id, record}} label="Year"><%= record.year %> <:action :let={{_id, record}}> <.link href={musicbrainz_url(record)} target=".blank">MB
<%= col[:label] %>