diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2022-05-31 01:04:10 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2022-05-31 01:04:10 +0200 |
| commit | 852ee620f0a2f6a83cf83eba860ca951b66bb7e2 (patch) | |
| tree | 3b1db871625c89f08c3c6422c135f84ec116943b /src/lib/components/post | |
| parent | d2cd7f1b4c318ac8587ab3dc1dec4a44b6d592fe (diff) | |
Use supabase
Diffstat (limited to 'src/lib/components/post')
| -rw-r--r-- | src/lib/components/post/post.svelte | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/lib/components/post/post.svelte b/src/lib/components/post/post.svelte index 535f7ac..b0f99e4 100644 --- a/src/lib/components/post/post.svelte +++ b/src/lib/components/post/post.svelte @@ -15,26 +15,30 @@ class="post-meta" title={$_('post.metadata_title', { values: { count: index + 1, total: count } })} > - <Glyph uuid={post.author.id} /> - <span class="h-card"> - {$_('post.author_credit')} - <a href="/a/{post.author.handle}" class="p-nickname u-url">{post.author.handle}</a>. - </span> + <Glyph uuid={post.author_id} /> + {#if post.author} + <span class="h-card"> + {$_('post.author_credit')} + <a href="/a/{post.author.handle}" class="p-nickname u-url underline text-blue-600 visited:text-purple-500">{post.author.handle}</a>. + </span> + {:else} + <span>????</span> + {/if} <time role="presentation" class="dt-published" datetime={timestampToISO(post.created_at)}> - <a title={$_('post.permalink_title')} href="/p/{post.id}"> + <a title={$_('post.permalink_title')} class="underline text-blue-600 visited:text-purple-500" href="/p/{post.id}"> {timestampToISO(post.created_at)} </a> </time> {#if post.topic} <span> - ({$_('post.topic_location')} <a href="/t/{post.topic.id}">{post.topic.title}</a>.) + ({$_('post.topic_location')} <a class="text-blue-600 underline visited:text-purple-500" href="/t/{post.topic.id}">{post.topic.title}</a>.) </span> {/if} </aside> <article - class="e-content" + class="e-content whitespace-pre" title={$_('post.title', { - values: { count: index + 1, total: count, author: post.author.handle } + values: { count: index + 1, total: count, author: post.author?.handle || '????' } })} > {post.text} |