diff --git a/lib/chiya_web/components/public_components.ex b/lib/chiya_web/components/public_components.ex index 088379c..1386f78 100644 --- a/lib/chiya_web/components/public_components.ex +++ b/lib/chiya_web/components/public_components.ex @@ -107,6 +107,7 @@ defmodule ChiyaWeb.PublicComponents do attr :layout, :atom, default: :list attr :notes, :list, required: true + attr :show_content, :boolean, default: true def note_list(assigns) do case assigns.layout do @@ -133,9 +134,9 @@ defmodule ChiyaWeb.PublicComponents do <%= for note <- assigns.notes do %> -
+
<%= note.name %> @@ -144,9 +145,11 @@ defmodule ChiyaWeb.PublicComponents do
+ <%= if assigns.show_content do %>

<%= String.slice(note.content, 0..150) %>

+ <% end %>
<% end %> diff --git a/lib/chiya_web/controllers/page_html/wiki.html.heex b/lib/chiya_web/controllers/page_html/wiki.html.heex index 41a9d5d..f38c9e8 100644 --- a/lib/chiya_web/controllers/page_html/wiki.html.heex +++ b/lib/chiya_web/controllers/page_html/wiki.html.heex @@ -3,25 +3,28 @@ <.header> <%= @channel.name %> + -
+
+
<%= Markdown.render(@channel.content) |> raw %>
+ +
- -
-
-

Recently Updated

- - <.note_list notes={@notes_updated} layout={@channel.layout} /> -
- -
-

Recently Published

- - <.note_list notes={@notes_published} layout={@channel.layout} /> -
-
+ <% else %>
<.header>