diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2022-05-01 00:56:06 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2022-05-01 00:56:06 +0200 |
| commit | a7cf03c192470cbab13edeb1aec99e0c66dede10 (patch) | |
| tree | 581b4430d1de958dcb666bae80a7678332134602 /src/components/topic/topic.svelte | |
| parent | 010f307346e525ac2e4239a0549d2c1a4d6d102b (diff) | |
Update / use typescript
Diffstat (limited to 'src/components/topic/topic.svelte')
| -rw-r--r-- | src/components/topic/topic.svelte | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/components/topic/topic.svelte b/src/components/topic/topic.svelte deleted file mode 100644 index c0dbfbc..0000000 --- a/src/components/topic/topic.svelte +++ /dev/null @@ -1,44 +0,0 @@ -<script> - export let topic; - - import { _ } from 'svelte-i18n'; - import Post from '$/components/post/post.svelte'; - import { readableTime } from '$/utils/readable_time.js'; - - $: remainingTime = topic.updated_at + topic.ttl - Date.now(); - $: remaining = readableTime(remainingTime); -</script> - -<div class="h-entry" title={$_('topic.title')}> - <h1 class="p-name">{topic.title}</h1> - <aside class="topic-meta" title={$_('topic.metadata_title')}> - {#if topic.forum} - <span class="topic-location"> - {$_('topic.category_location')} - <a href="/f/{topic.forum.id}" class="p-category"> - {topic.forum.glyph} {$_(topic.forum.label)} - </a>. - </span> - {/if} - <span class="topic-ttl"> - <a class="u-url u-uid" title={$_('topic.permalink_title')} href="/t/{topic.id}"> - ({$_('topic.remaining_time', { - values: { remaining: $_(remaining.label, { values: { count: remaining.count } }) } - })}) - </a>. - </span> - </aside> - {#if topic.tags.length > 0} - <aside class="topic-tags" title={$_('topic.tags_title')}> - {$_('topic.tags_location')} - {#each topic.tags as tag} - <a href="/g/{tag.id}" class="p-category"> - {tag.id}<span class="tag-weight">({tag.weight})</span> - </a>{' '} - {/each} - </aside> - {/if} - {#each topic.posts as post, index} - <Post {post} {index} count={topic.posts.length} /> - {/each} -</div> |