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

52 lines
1.5 KiB
Text
Raw Normal View History

2023-07-09 20:01:03 +02:00
<%= if @channel do %>
2023-09-08 23:01:39 +02:00
<header>
<h1><%= @channel.name %></h1>
</header>
2023-09-08 23:01:39 +02:00
<section class="mt-6 flex flex-col">
2023-07-27 20:31:23 +02:00
<section class="prose prose-gruvbox md:prose-lg lg:prose-xl max-w-none">
2023-07-09 20:01:03 +02:00
<%= Markdown.render(@channel.content) |> raw %>
</section>
2023-07-27 20:31:23 +02:00
<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>
2023-09-05 21:59:37 +02:00
<%= if @channel.layout == :default do %>
2023-09-08 23:01:39 +02:00
<.note_list_default notes={@notes_updated}/>
2023-09-05 21:59:37 +02:00
<% end %>
<%= if @channel.layout == :gallery do %>
2023-09-08 23:01:39 +02:00
<.note_list_gallery notes={@notes_updated}/>
2023-09-05 21:59:37 +02:00
<% end %>
<%= if @channel.layout == :microblog do %>
2023-09-08 23:01:39 +02:00
<.note_list_microblog notes={@notes_updated}/>
2023-09-05 21:59:37 +02:00
<% end %>
2023-07-27 20:31:23 +02:00
</div>
2023-07-27 20:31:23 +02:00
<div class="mt-6 flex flex-1 flex-col gap-1.5">
<h2 class="text-xl text-theme-base">Recently Published</h2>
2023-09-05 21:59:37 +02:00
<%= if @channel.layout == :default do %>
2023-09-08 23:01:39 +02:00
<.note_list_default notes={@notes_published}/>
2023-09-05 21:59:37 +02:00
<% end %>
<%= if @channel.layout == :gallery do %>
2023-09-08 23:01:39 +02:00
<.note_list_gallery notes={@notes_published}/>
2023-09-05 21:59:37 +02:00
<% end %>
<%= if @channel.layout == :microblog do %>
2023-09-08 23:01:39 +02:00
<.note_list_microblog notes={@notes_published}/>
2023-09-05 21:59:37 +02:00
<% end %>
2023-07-27 20:31:23 +02:00
</div>
</aside>
2023-07-09 20:01:03 +02:00
</section>
<% else %>
2023-09-08 23:01:39 +02:00
<section>
2023-07-09 20:01:03 +02:00
<.header>
Wiki
</.header>
2023-09-08 23:01:39 +02:00
<section class="prose">
2023-07-09 20:01:03 +02:00
Wiki is not set up.
</section>
</section>
<% end %>