Basic API kind of worked out and solved a bunch of things with alpine.js
This commit is contained in:
parent
f49608d74c
commit
07fa59c8e7
12 changed files with 149 additions and 61 deletions
|
|
@ -7,17 +7,9 @@
|
|||
<link rel="stylesheet" href="/blockstart.css">
|
||||
<title>ZedShaw's Game Thing</title>
|
||||
<script defer src="/js/alpine.js"></script>
|
||||
|
||||
<script src="/js/code.js"></script>
|
||||
<script>
|
||||
let Streams = {
|
||||
items: [],
|
||||
|
||||
pastStreams: async () => {
|
||||
const resp = await fetch("/api/stream/index.json");
|
||||
console.assert(resp.status == 200, "failed to get it");
|
||||
return await resp.json();
|
||||
}
|
||||
};
|
||||
let Streams = new GetJson("/api/stream/index.json");
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
|
@ -34,7 +26,7 @@
|
|||
</block>
|
||||
|
||||
<block x-data="Streams">
|
||||
<template x-for="item in pastStreams">
|
||||
<template x-for="item in theData">
|
||||
<stream class="horizontal">
|
||||
<shape style="--w: 100px; --h: 100px">Stream Thumbnail</shape>
|
||||
<info>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue