feat: show all the conetnt of note

This commit is contained in:
KazooTTT
2025-02-06 01:09:40 +08:00
parent 24f9504836
commit 3c04fece23

View File

@ -29,7 +29,7 @@ const dateTimeOptions: Intl.DateTimeFormatOptions = note.data.date_created
const date = note.data.date_created ?? note.data.date; const date = note.data.date_created ?? note.data.date;
let modifiedDate = note.data?.date_modified; let modifiedDate = note.data?.date_modified;
if (modifiedDate && modifiedDate.getTime() === date.getTime()) { if (modifiedDate && modifiedDate.toDateString() === date.toDateString()) {
modifiedDate = undefined; modifiedDate = undefined;
} }
--- ---
@ -43,7 +43,7 @@ if (modifiedDate && modifiedDate.getTime() === date.getTime()) {
{ {
isPreview ? ( isPreview ? (
<> <>
{index + 1}.{" "} {index ? `${index + 1}.` : ""}
<a class="cactus-link" href={`/notes/${note.id}/`}> <a class="cactus-link" href={`/notes/${note.id}/`}>
{note.data.title} {note.data.title}
</a> </a>
@ -64,10 +64,7 @@ if (modifiedDate && modifiedDate.getTime() === date.getTime()) {
) )
} }
</div> </div>
<div <div class="prose prose-sm prose-cactus mt-4 max-w-none [&>p:last-of-type]:mb-0">
class="prose prose-sm prose-cactus mt-4 max-w-none [&>p:last-of-type]:mb-0"
class:list={{ "line-clamp-6": isPreview }}
>
<Content /> <Content />
</div> </div>
{!isPreview && <GiscusComment client:load />} {!isPreview && <GiscusComment client:load />}