X-Git-Url: https://git.r.bdr.sh/rbdr/forum/blobdiff_plain/bd8e98d7e24c4dbaee7db6ec7955f7c2f6d396a6..a5969b7fc8bfc451da2969f06898c25eca35a4b2:/src/components/topic/topic.svelte?ds=sidebyside 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}