36 lines
756 B
Svelte
36 lines
756 B
Svelte
|
<script>
|
||
|
export let id;
|
||
|
const fetchUser = (async () => {
|
||
|
const response = await fetch(`http://127.0.0.1:5000/user/${id}.json`);
|
||
|
return await response.json();
|
||
|
})();
|
||
|
const converter = new showdown.Converter();
|
||
|
|
||
|
import { replaceWiki } from "./util.js";
|
||
|
</script>
|
||
|
|
||
|
<main>
|
||
|
This is nodes module
|
||
|
{#await fetchUser}
|
||
|
.. Waiting
|
||
|
{:then result}
|
||
|
<div>
|
||
|
{#each result.subnodes as subnode}
|
||
|
<div>
|
||
|
<div><a href='/node/{subnode.wikilink}'>{subnode.wikilink}</a></div>
|
||
|
</div>
|
||
|
{/each}
|
||
|
</div>
|
||
|
|
||
|
{/await}
|
||
|
</main>
|
||
|
|
||
|
<style>
|
||
|
div {
|
||
|
margin-bottom: 10px;
|
||
|
}
|
||
|
.node-title {
|
||
|
font-weight: bold;
|
||
|
}
|
||
|
</style>
|