37 lines
		
	
	
	
		
			1,013 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
	
		
			1,013 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <script>
 | |
|   let req = new GetJson("/api/stream/1");
 | |
|   let link_req = new GetJson("/api/stream/1/links");
 | |
| </script>
 | |
| 
 | |
| <div x-init="Stream = await req.theData()" x-data="{Stream: {}}">
 | |
|   <blockstart>
 | |
| 
 | |
|   <shape style="--w: 100%; --h: 350px">
 | |
|   Stream Viewer
 | |
|   </shape>
 | |
| 
 | |
|   <block>
 | |
|     <h2>Links Found in Chat</h2>
 | |
|     <ul x-init="links = await link_req.theData()" x-data="{links: {}}">
 | |
|       <template x-for="item in links">
 | |
|         <li><a x-text="item.description" x-bind:href="item.url"></a></li>
 | |
|       </template>
 | |
|     </ul>
 | |
|   </block>
 | |
| 
 | |
|   <form action="/api/link" method="POST">
 | |
|     <card>
 | |
|       <top>Submit a Link</top>
 | |
|       <middle>
 | |
|         <input id="stream_id" name="stream_id" type="hidden" value="1">
 | |
|         <input id="url" name="url" type="text" placeholder="Link Url">
 | |
|         <input id="description" name="description" type="text" placeholder="Description">
 | |
|       </middle>
 | |
|     </card>
 | |
|     <buttons>
 | |
|       <button id="submit" type="submit">Send It</button>
 | |
|     </buttons>
 | |
|   </form>
 | |
| 
 | |
|   </blockstart>
 | |
| </div>
 | 
