From 0b6a5881b99027be9a175e7d1f2b112daef1ab51 Mon Sep 17 00:00:00 2001 From: Dawid Rycerz Date: Thu, 3 Jul 2025 14:31:38 +0300 Subject: Add images support --- src/components/note/Note.astro | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/components/note/Note.astro') diff --git a/src/components/note/Note.astro b/src/components/note/Note.astro index a8cf205..3017d2d 100644 --- a/src/components/note/Note.astro +++ b/src/components/note/Note.astro @@ -44,6 +44,27 @@ const { Content } = await render(note); class:list={{ "line-clamp-6": isPreview }} > + { + !isPreview && note.data.attachments && note.data.attachments.length > 0 && ( +
+ {note.data.attachments.map((attachment: { url: string; type: string }) => ( + + Attachment + + ))} +
+ ) + } { !isPreview && note.data.sourceUrl && ( <> -- cgit v1.2.3