Render artist bio in a left-side sheet

This commit is contained in:
Claudio Ortolina
2025-05-21 20:18:36 +01:00
parent 572b3bcd48
commit 80ca186ba8
5 changed files with 52 additions and 23 deletions
@@ -240,4 +240,14 @@ defmodule MusicLibraryWeb.ArtistLive.Show do
)
end
end
defp remove_read_more_link(summary) do
last_fm_link_regex = ~r/<a.*Read more on Last\.fm<\/a>\.*\s*/
reformatted_summary = String.replace(summary, last_fm_link_regex, "")
PhoenixHTMLHelpers.Format.text_to_html(reformatted_summary,
escape: false,
attributes: [class: "mt-2 text-sm/7"]
)
end
end