devel #232

Merged
inhji merged 4 commits from devel into main 2023-07-25 07:32:36 +02:00
2 changed files with 13 additions and 2 deletions

View file

@ -56,7 +56,7 @@ defmodule Chiya.Notes.Note do
end
def note_path_admin(note) do
~p"/admin/note/#{note.slug}"
~p"/admin/notes/#{note.slug}"
end
def note_url(note) do

View file

@ -123,6 +123,10 @@ defmodule ChiyaWeb.PublicComponents do
attr :notes, :list, required: true
@doc """
Default note list that renders a list of rounded boxes,
which show the note title and an excerpt of the content
"""
def note_list_headers(assigns) do
~H"""
<section class="note-list default | mt-6 sm:w-auto flex flex-col gap-3">
@ -158,9 +162,16 @@ defmodule ChiyaWeb.PublicComponents do
<article class="mt-4 first:mt-0">
<.featured_images note={note} />
<div class="prose prose-gruvbox mt-2">
<header class="mt-4 text-lg">
<%= if(note.kind == :bookmark) do %>
<strong><%= note.name %></strong>
<% end %>
</header>
<div class="prose prose-gruvbox mt-4">
<%= raw(render(note.content)) %>
</div>
<footer class="mt-4">
<time class="text-theme-base/75">
<%= pretty_datetime(note.published_at) %>