]>
Commit | Line | Data |
---|---|---|
c1bc5993 RBR |
1 | <script> |
2 | export let topic; | |
3 | ||
4 | import { _ } from 'svelte-i18n'; | |
cbe4a5fc | 5 | import { readableTime } from '$/utils/readable_time.js'; |
c1bc5993 RBR |
6 | |
7 | $: remainingTime = (topic.updated_at + topic.ttl) - Date.now(); | |
8 | $: remaining = readableTime(remainingTime); | |
9 | </script> | |
10 | ||
11 | <li class="h-entry" title="{$_('topic.title')}"> | |
12 | <span class="p-name"><a class="u-url u-uid" title="{$_('topic.permalink_title')}" href="/t/{topic.id}">{topic.title}</a></span> | |
13 | <span class="topic-ttl">({$_('topic.remaining_time', { values: { remaining: $_(remaining.label, { values: { count: remaining.count } }) } })})</span> | |
14 | </li> | |
15 | ||
16 | <style> | |
17 | </style> |