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 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)) %>
+