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

54 lines
1.7 KiB
Text
Raw Normal View History

<%= if @channel do %>
<section class="mx-auto max-w-2xl">
<.header>
2023-08-03 16:15:39 +02:00
Bookmarks
2023-08-16 22:39:46 +02:00
<:subtitle><%= Enum.count(@notes) %> in total</:subtitle>
</.header>
</section>
<section class="mt-6 grid grid-cols-1 md:grid-cols-3 gap-3 max-w-4xl mx-auto">
<section class="col-span-1 md:col-span-2">
2023-09-05 21:59:37 +02:00
<%= if @channel.layout == :default do %>
<.note_list_default notes={@notes}/>
2023-09-05 21:59:37 +02:00
<% end %>
<%= if @channel.layout == :gallery do %>
<.note_list_gallery notes={@notes}/>
2023-09-05 21:59:37 +02:00
<% end %>
<%= if @channel.layout == :microblog do %>
<.note_list_microblog notes={@notes}/>
2023-09-05 21:59:37 +02:00
<% end %>
</section>
2023-08-01 07:32:06 +02:00
<section>
<ul>
2023-08-02 20:48:45 +02:00
<%= for {letter, tag_group} <- @tags do %>
<li class="mb-2">
<span class="capitalize text-theme-primary border border-theme-background1 rounded font-sm px-2 py-1 inline-block mb-2">
<%= letter %>
</span>
<%= for tag <- tag_group do %>
<a
href={~p"/tagged-with/#{tag.slug}"}
class="border border-theme-background1 rounded font-sm px-2 py-1 inline-block mb-2 hover:bg-theme-background1 transition"
>
2023-08-16 22:46:13 +02:00
<%= tag.name %> <span class="text-theme-base text-xs font-mono bg-theme-primary/25 rounded-full py-0.5 px-1 align-middle"><%= Enum.count(tag.notes) %></span>
2023-08-02 20:48:45 +02:00
</a>
<% end %>
</li>
<% end %>
2023-08-01 07:32:06 +02:00
</ul>
</section>
</section>
<% else %>
<section class="mx-auto max-w-2xl">
<.header>
Bookmarks
</.header>
<section class="prose prose-gruvbox mt-6">
Bookmarks not set up.
</section>
</section>
<% end %>