From 9a375d2a2494dd262230fcbedc4bf24d80cb93e7 Mon Sep 17 00:00:00 2001 From: Inhji Date: Tue, 25 Jul 2023 07:31:46 +0200 Subject: [PATCH 1/2] fix url --- lib/chiya/notes/note.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chiya/notes/note.ex b/lib/chiya/notes/note.ex index 8ce6c4a..8603899 100644 --- a/lib/chiya/notes/note.ex +++ b/lib/chiya/notes/note.ex @@ -56,7 +56,7 @@ defmodule Chiya.Notes.Note do end def note_path_admin(note) do - ~p"/admin/note/#{note.slug}" + ~p"/admin/notes/#{note.slug}" end def note_url(note) do From 9e671e8b4655ad0ada5af465d90492a90c58f801 Mon Sep 17 00:00:00 2001 From: Inhji Date: Tue, 25 Jul 2023 07:32:00 +0200 Subject: [PATCH 2/2] show header for bookmarks in microblog layout --- lib/chiya_web/components/public_components.ex | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/chiya_web/components/public_components.ex b/lib/chiya_web/components/public_components.ex index c46dc96..088379c 100644 --- a/lib/chiya_web/components/public_components.ex +++ b/lib/chiya_web/components/public_components.ex @@ -123,6 +123,10 @@ defmodule ChiyaWeb.PublicComponents do attr :notes, :list, required: true + @doc """ + Default note list that renders a list of rounded boxes, + which show the note title and an excerpt of the content + """ def note_list_headers(assigns) do ~H"""
@@ -158,9 +162,16 @@ defmodule ChiyaWeb.PublicComponents do
<.featured_images note={note} /> -
+
+ <%= if(note.kind == :bookmark) do %> + <%= note.name %> + <% end %> +
+ +
<%= raw(render(note.content)) %>
+