chiya/lib/chiya_web/controllers/page_html/wiki.html.heex
2023-07-09 20:01:03 +02:00

35 lines
966 B
Text

<%= if @channel do %>
<section class="mx-auto max-w-2xl">
<.header>
<%= @channel.name %>
</.header>
<section class="prose prose-gruvbox mt-6">
<%= Markdown.render(@channel.content) |> raw %>
</section>
</section>
<section class="flex flex-col md:flex-row gap-3 mt-6 w-full sm:px-3">
<div class="w-full mt-6 sm:w-auto flex flex-1 flex-col gap-1.5">
<h2 class="text-xl text-theme-base">Recently Updated</h2>
<.note_list notes={@notes_updated} layout={@channel.layout} />
</div>
<div class="w-full mt-6 sm:w-auto flex flex-1 flex-col gap-1.5">
<h2 class="text-xl text-theme-base">Recently Published</h2>
<.note_list notes={@notes_published} layout={@channel.layout} />
</div>
</section>
<% else %>
<section class="mx-auto max-w-2xl">
<.header>
Wiki
</.header>
<section class="prose prose-gruvbox mt-6">
Wiki is not set up.
</section>
</section>
<% end %>