1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-22 22:39:36 +02:00

Merge pull request #569 from lkiesow/note-preview

Show Note Preview on Card
This commit is contained in:
Sean Morley 2025-05-09 21:29:51 -04:00 committed by GitHub
commit 73c664e549
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -71,11 +71,28 @@
{#if unlinked}
<div class="badge badge-error">{$t('adventures.out_of_range')}</div>
{/if}
{#if note.content && note.content.length > 0}
<p class="line-clamp-6">
{note.content}
</p>
{/if}
{#if note.links && note.links.length > 0}
<p>
{note.links.length}
{note.links.length > 1 ? $t('adventures.links') : $t('adventures.link')}
</p>
<ul class="list-disc pl-6">
{#each note.links.slice(0, 3) as link}
<li>
<a class="link link-primary" href={link}>
{link.split('//')[1].split('/', 1)[0]}
</a>
</li>
{/each}
{#if note.links.length > 3}
<li></li>
{/if}
</ul>
{/if}
{#if note.date && note.date !== ''}
<div class="inline-flex items-center">