onEdit(note)} onkeydown={(e) => e.key === 'Enter' && onEdit(note)} role="button" tabindex="0" data-testid="note-card" data-note-id={note.id} > {#if featuredAttachments.length > 0}
{#each featuredAttachments.slice(0, 3) as attachment}
{attachment.filename} { e.stopPropagation(); lightboxSrc = `/api/notes/${note.id}/attachments?attachmentId=${attachment.id}`; lightboxAlt = attachment.filename; }} data-testid="card-thumbnail" />
{/each} {#if featuredAttachments.length > 3}
+{featuredAttachments.length - 3}
{/if}
{/if} {#if note.pinned} {/if} {#if note.title}

{note.title}

{/if} {#if note.checklistMode && checklistItems.length > 0} {:else if note.content}
{@html renderedContent}
{/if} {#if note.tags && note.tags.length > 0}
{#each note.tags as tag} {/each}
{/if}
{#if $currentFilter === 'trashed'} {:else} {#if !note.pinned} {/if} {#if $currentFilter === 'archived'} {:else} {/if} {/if}
{#if lightboxSrc} lightboxSrc = null} /> {/if}