45 lines
1.3 KiB
Text
45 lines
1.3 KiB
Text
<%= if @channel do %>
|
|
<section class="mx-auto max-w-2xl">
|
|
<.header>
|
|
Bookmarks
|
|
<: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">
|
|
<.note_list notes={@notes} layout={@channel.layout} show_content={false} />
|
|
</section>
|
|
|
|
<section>
|
|
<ul>
|
|
<%= 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"
|
|
>
|
|
<%= tag.name %> <%= Enum.count(tag.notes) %>
|
|
</a>
|
|
<% end %>
|
|
</li>
|
|
<% end %>
|
|
</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 %>
|