From 4281a9018fc2016c024a2b71040750b49dd3552f Mon Sep 17 00:00:00 2001 From: tree Date: Tue, 12 Apr 2022 09:58:45 +0200 Subject: [PATCH] update --- src/lib/Paragraph.svelte | 1 + src/lib/api.js | 2 ++ src/routes/udalosti.svelte | 11 ++++++----- 3 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 src/lib/Paragraph.svelte diff --git a/src/lib/Paragraph.svelte b/src/lib/Paragraph.svelte new file mode 100644 index 0000000..e07be56 --- /dev/null +++ b/src/lib/Paragraph.svelte @@ -0,0 +1 @@ +

diff --git a/src/lib/api.js b/src/lib/api.js index 2c645fd..b74d173 100644 --- a/src/lib/api.js +++ b/src/lib/api.js @@ -14,6 +14,8 @@ class API { if (!this.bundle) { if (local) { this.bundle = staticBundle + //const resp = await fetch('http://localhost:8000/22/bundle.json') + //this.bundle = await resp.json() } else { const resp = await fetch('https://spec.utxo.cz/22/bundle.json') this.bundle = await resp.json() diff --git a/src/routes/udalosti.svelte b/src/routes/udalosti.svelte index 92b642f..3d155fd 100644 --- a/src/routes/udalosti.svelte +++ b/src/routes/udalosti.svelte @@ -13,8 +13,9 @@ import calcDuration from "$lib/events.js"; import SvelteMarkdown from "svelte-markdown"; import Link from "$lib/Link.svelte"; + import Paragraph from "$lib/Paragraph.svelte"; - const renderers = { link: Link }; + const renderers = { link: Link, paragraph: Paragraph }; $: id = getId($page.url.search); $: e = $bundle ? $bundle.spec.events.find((ev) => ev.id === id) : null; @@ -70,11 +71,11 @@ {/each} {/if} -
- {#if e.description} + {#if e.description} +
- {/if} -
+
+ {/if} {#if childrens.length}

Obsahuje události ({ childrens.length })