This commit is contained in:
tree 2022-04-12 09:58:45 +02:00
rodič fc43d45d7d
revize 4281a9018f
3 změnil soubory, kde provedl 9 přidání a 5 odebrání

1
src/lib/Paragraph.svelte Normal file
Zobrazit soubor

@ -0,0 +1 @@
<p class="mb-2"><slot /></p>

Zobrazit soubor

@ -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()

Zobrazit soubor

@ -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}
</div>
{/if}
<div class="mt-8">
{#if e.description}
{#if e.description}
<div class="mt-6 mb-6">
<SvelteMarkdown source={e.description} {renderers} />
{/if}
</div>
</div>
{/if}
{#if childrens.length}
<div><h2 class="text uppercase mb-4">Obsahuje události ({ childrens.length })</h2></div>
<div>