„lib/chiya_web/components/public_components.ex“ ändern

This commit is contained in:
inhji 2023-07-05 13:11:29 +02:00
parent f3760b06df
commit 6203cd1c4a

View file

@ -115,16 +115,20 @@ defmodule ChiyaWeb.PublicComponents do
def note_list_headers(assigns) do def note_list_headers(assigns) do
~H""" ~H"""
<section class="note-list default | mt-6 sm:w-auto flex flex-col gap-1.5"> <section class="note-list default | mt-6 sm:w-auto flex flex-col gap-3">
<%= for note <- assigns.notes do %> <%= for note <- assigns.notes do %>
<a <a href={~p"/note/#{note.slug}"}
href={~p"/note/#{note.slug}"} class="rounded-lg -mx-2 -my-0.5 px-2 py-0.5 border-theme-background1 hover:bg-theme-background1 transition">
class="rounded-lg -mx-2 -my-0.5 px-2 py-0.5 hover:bg-theme-secondary/10 transition" <header>
>
<span class="text-theme-secondary text-lg font-semibold leading-8"> <span class="text-theme-secondary text-lg font-semibold leading-8">
<%= note.name %> <%= note.name %>
</span> </span>
<span class="text-theme-base/75 text-sm"><%= pretty_date(note.published_at) %></span> <span class="text-theme-base/75 text-sm">
<%= pretty_date(note.published_at) %>
</span>
</header>
<p class="text-theme-base"><%= String.slice(note.content, 0..100) %></p>
</a> </a>
<% end %> <% end %>
</section> </section>