chiya/lib/chiya_web/controllers/page_html/wiki.html.heex

53 lines
1.6 KiB
Text

<%= if @channel do %>
<section class="mx-auto max-w-2xl">
<.header>
<%= @channel.name %>
</.header>
</section>
<section class="mt-6 flex flex-col gap-3 max-w-2xl mx-auto">
<section class="prose prose-gruvbox md:prose-lg lg:prose-xl max-w-none">
<%= Markdown.render(@channel.content) |> raw %>
</section>
<aside class="flex flex-col md:flex-row gap-3 mt-6">
<div class="mt-6 flex flex-1 flex-col gap-1.5">
<h2 class="text-xl text-theme-base">Recently Updated</h2>
<%= if @channel.layout == :default do %>
<.note_list_default note={@notes_updated}/>
<% end %>
<%= if @channel.layout == :gallery do %>
<.note_list_gallery note={@notes_updated}/>
<% end %>
<%= if @channel.layout == :microblog do %>
<.note_list_microblog note={@notes_updated}/>
<% end %>
</div>
<div class="mt-6 flex flex-1 flex-col gap-1.5">
<h2 class="text-xl text-theme-base">Recently Published</h2>
<%= if @channel.layout == :default do %>
<.note_list_default note={@notes_published}/>
<% end %>
<%= if @channel.layout == :gallery do %>
<.note_list_gallery note={@notes_published}/>
<% end %>
<%= if @channel.layout == :microblog do %>
<.note_list_microblog note={@notes_published}/>
<% end %>
</div>
</aside>
</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 %>