summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorDawid Rycerz <dawid@rycerz.xyz>2026-01-12 19:54:27 +0100
committerDawid Rycerz <dawid@rycerz.xyz>2026-01-12 19:54:27 +0100
commit6e19444bd32c271b53971eaad7377e340259100c (patch)
treebeed4bdb0bf8aba654c6d8bdadfe09fdc030cf6d /src/components
parent5e7ea1523908774c7e2dbfd47f0c6e0a2f503971 (diff)
Add alt text support
Diffstat (limited to 'src/components')
-rw-r--r--src/components/note/Note.astro4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/note/Note.astro b/src/components/note/Note.astro
index 3017d2d..920cbc1 100644
--- a/src/components/note/Note.astro
+++ b/src/components/note/Note.astro
@@ -47,7 +47,7 @@ const { Content } = await render(note);
{
!isPreview && note.data.attachments && note.data.attachments.length > 0 && (
<div class="mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2">
- {note.data.attachments.map((attachment: { url: string; type: string }) => (
+ {note.data.attachments.map((attachment: { type: string; url: string; alt?: string }) => (
<a
href={attachment.url}
target="_blank"
@@ -56,7 +56,7 @@ const { Content } = await render(note);
>
<img
src={attachment.url}
- alt="Attachment"
+ alt={attachment.alt || "Image"}
class="h-48 w-full object-cover"
loading="lazy"
/>