All the pages are working again, but Alpine is insanely frustrating.
This commit is contained in:
parent
81cf5e0d93
commit
7125bc2d2a
15 changed files with 95 additions and 40 deletions
|
@ -1,16 +1,16 @@
|
|||
<script>
|
||||
let req = new GetJson("/api/stream/1");
|
||||
let link_req = new GetJson("/api/stream/1/links");
|
||||
let Stream = new GetJson("/api/stream/1");
|
||||
let Links = new PaginateTable("/api/stream/1/links");
|
||||
</script>
|
||||
|
||||
<div x-init="Stream = await req.theData()" x-data="{Stream: {}}">
|
||||
<div x-init="item = await Stream.item()" x-data="{item: {}}">
|
||||
<blockstart>
|
||||
|
||||
<block style="--value: 7">
|
||||
<h1 x-text="Stream.title"></h1>
|
||||
<h1 x-text="item.title"></h1>
|
||||
|
||||
<div>
|
||||
<p x-text="Stream.description"></p>
|
||||
<p x-text="item.description"></p>
|
||||
</div>
|
||||
</block>
|
||||
|
||||
|
@ -21,8 +21,8 @@
|
|||
<block>
|
||||
<h2>Links Posted</h2>
|
||||
|
||||
<ul x-init="links = await link_req.theData()" x-data="{links: {}}">
|
||||
<template x-for="item in links">
|
||||
<ul x-data="Links">
|
||||
<template x-for="item in contents">
|
||||
<li><a x-text="item.description" x-bind:href="item.url"></a></li>
|
||||
</template>
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue