From: Ruben Beltran del Rio Date: Sun, 14 Mar 2021 22:08:44 +0000 (+0100) Subject: Add tag component: X-Git-Url: https://git.r.bdr.sh/rbdr/forum/commitdiff_plain/cbe4a5fc39533cc244a05dbd866b1cb903776863 Add tag component: --- diff --git a/src/components/tag/tag.svelte b/src/components/tag/tag.svelte new file mode 100644 index 0000000..a14cd19 --- /dev/null +++ b/src/components/tag/tag.svelte @@ -0,0 +1,27 @@ + + +{#if $store.loading} + +{/if} +{#if $store.error} + +{/if} +{#if tag} +

{$_('tag.title')} {tag.id}

+
    + {#each tag.topics as topic} + + {/each} +
+{/if} diff --git a/src/components/topic_summary/topic_summary.svelte b/src/components/topic_summary/topic_summary.svelte index deef3e2..88b2b83 100644 --- a/src/components/topic_summary/topic_summary.svelte +++ b/src/components/topic_summary/topic_summary.svelte @@ -2,7 +2,7 @@ export let topic; import { _ } from 'svelte-i18n'; - import { readableTime } from '../../utils/readable_time.js'; + import { readableTime } from '$/utils/readable_time.js'; $: remainingTime = (topic.updated_at + topic.ttl) - Date.now(); $: remaining = readableTime(remainingTime);