diff --git a/lib/chiya_web/components/public_components.ex b/lib/chiya_web/components/public_components.ex
index dde1679..ca87b91 100644
--- a/lib/chiya_web/components/public_components.ex
+++ b/lib/chiya_web/components/public_components.ex
@@ -103,153 +103,173 @@ defmodule ChiyaWeb.PublicComponents do
def note_list(assigns) do
case assigns.layout do
:gallery ->
- ~H"""
-
- """
+ note_list_gallery(assigns)
:microblog ->
- ~H"""
-
- <%= for note <- assigns.notes do %>
-
- <% image = main_image(note) %>
- <%= if image do %>
-
- <% end %>
+ note_list_microblog(assigns)
-
- <%= raw(render(note.content)) %>
-
-
-
-
- <.divider />
- <% end %>
-
- """
-
- # default, show headings only
_ ->
- ~H"""
-
- """
+ note_list_headers(assigns)
end
end
- # def comment_form(assigns) do
- # ~H"""
- # <.simple_form :let={f} for={@changeset} action="" class="bg-theme-background -m-3">
- # <.error :if={@changeset.action}>
- # Oops, something went wrong! Please check the errors below.
- #
- # <.input
- # field={f[:author_name]}
- # type="text"
- # placeholder="Name"
- # class="bg-theme-background dark:bg-theme-background border-theme-base/20 dark:border-theme-base/20 text-theme-base dark:text-theme-base placeholder-theme-base/40 dark:placeholder-theme-base/60 dark:focus:border-theme-base/60 dark:focus:border-theme-base/60"
- # />
- # <.input
- # field={f[:content]}
- # type="textarea"
- # placeholder="Content"
- # rows="3"
- # class="bg-theme-background dark:bg-theme-background border-theme-base/20 dark:border-theme-base/20 text-theme-base dark:text-theme-base placeholder-theme-base/60 dark:placeholder-theme-base/60 focus:border-theme-base/60 dark:focus:border-theme-base/60"
- # />
- # <.input field={f[:note_id]} type="hidden" />
- # <:actions>
- # <.button>Submit Comment
- #
- #
- # """
- # end
+ def note_list_headers(assigns) do
+ ~H"""
+
+ """
+ end
- # def comment_list(assigns) do
- # ~H"""
- # <%= if not Enum.empty?(assigns.note.comments) do %>
- # <.line />
+ attr :note, :map, required: true
- #
+ <%= for note <- assigns.notes do %>
+
+ <.featured_images note={note} />
- #
- # <% else %>
- # <.line />
+
+ <%= raw(render(note.content)) %>
+
+
+
- # No comments yet.
- # <% end %>
- # """
- # end
+ <.divider />
+ <% end %>
+
+ """
+ end
+
+ def note_list_gallery(assigns) do
+ ~H"""
+