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
|
@ -6,10 +6,14 @@
|
|||
<link rel="stylesheet" href="/color.css">
|
||||
<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 req = new GetJson("/api/live/index.json");
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<body x-init="Stream = await req.theData()" x-data="{Stream: {}}">
|
||||
<header>
|
||||
<a href="/">🏡</a> <span>Zed's Game Dev Website Yay</span>
|
||||
</header>
|
||||
|
@ -22,12 +26,11 @@
|
|||
|
||||
<block>
|
||||
<h2>Links Found in Chat</h2>
|
||||
<dl>
|
||||
<dt><a href="#">https://somelink.com</a></dt>
|
||||
<dd>A funky website</dd>
|
||||
<dt><a href="#">https://somelink.com</a></dt>
|
||||
<dd>A funky website</dd>
|
||||
</dl>
|
||||
<ul>
|
||||
<template x-for="item in Stream.links">
|
||||
<li><a x-text="item.description" x-bind:href="item.url"></a></li>
|
||||
</template>
|
||||
</ul>
|
||||
</block>
|
||||
|
||||
<form action="/api/link" method="POST">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue