From 3eccc2fd44e862228b3d3bfa1defa84c9ef6d910 Mon Sep 17 00:00:00 2001 From: KKlochko Date: Mon, 28 Apr 2025 14:05:22 +0300 Subject: [PATCH] Update the Author Show LiveView to show only the description. --- .../live/author_live/show.ex | 41 +++++++++++++------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/lib/decentralised_book_index_web/live/author_live/show.ex b/lib/decentralised_book_index_web/live/author_live/show.ex index 4e9d66f..cc9db6d 100644 --- a/lib/decentralised_book_index_web/live/author_live/show.ex +++ b/lib/decentralised_book_index_web/live/author_live/show.ex @@ -25,26 +25,43 @@ defmodule DecentralisedBookIndexWeb.AuthorLive.Show do -
+
<%= if @author.avatar_url != nil do %> - {"#{@author.name} + {"#{@author.name} <% else %> -
- +
+ + + +
<% end %> - <.list class="mt-5"> - <:item title="Id">{@author.id} - - <:item title="Name">{@author.name} - - <:item title="Description">{@author.description} - +
+

Description

+

+ {@author.description} +

+
<%= if @alternative_names != [] do %> -

Alternatives names

+

+ Alternatives names +

    <%= for alias_author <- @alternative_names do %> <.link navigate={~p"/authors/#{alias_author.id}"}>