X-Git-Url: https://git.r.bdr.sh/rbdr/forum/blobdiff_plain/cbe4a5fc39533cc244a05dbd866b1cb903776863..74b03c33ff37d7363721bc2c33abb867dc9ea87c:/src/components/topic/topic.svelte diff --git a/src/components/topic/topic.svelte b/src/components/topic/topic.svelte index 2aff79a..9be7346 100644 --- a/src/components/topic/topic.svelte +++ b/src/components/topic/topic.svelte @@ -1,59 +1,46 @@ + import ErrorBlock from '$/components/error_block/error_block.svelte'; + import Loader from '$/components/loader/loader.svelte'; + import PostContent from '$/components/post_content/post_content.svelte'; + import { readableTime } from '$/utils/readable_time.js'; -
-

This is a post in the forum.

- - - -
-

This is a main topic in the forum. Does that abstraction still even make sense?

-

Is this really it??

-

This might all be fake but at least the links look purple when visited

-
-
- -
-

It's just how it is...

-
-
-
+ $: store = getTopic(id); + $: topic = $store.data; + $: remainingTime = topic ? (topic.updated_at + topic.ttl) - Date.now() : 0; + $: remaining = readableTime(remainingTime); + - +{#if $store.loading} + +{/if} +{#if $store.error} + +{/if} +{#if topic} +
+

{topic.title}

+ + {#if topic.tags.length > 0} + + {/if} + {#each topic.posts as post, index} + + {/each} +
+{/if}