Now can alternatively generate a static page for a URL from pages, or dynamically return it with c.Render from views. Did this for games and streams.

This commit is contained in:
Zed A. Shaw 2025-07-10 11:46:56 -04:00
parent cb537328ff
commit d095bc9ff4
6 changed files with 45 additions and 94 deletions

View file

@ -1,39 +0,0 @@
<script>
let req = new GetJson("/api/game/1/index.json");
</script>
<blockstart>
<shape style="--w: 100%; --h: 300px">Gameplay Demo Video</shape>
<block style="--value: 7">
<h1 x-text="Game.title">Title</h1>
<block class="horizontal">
<shape style="--w: 200px; --h: 200px;">Some Image</shape>
<p x-text="Game.description">Description</p>
</block>
</block>
<block>
<p>Polaroid retro pork belly yes plz bitters, viral chicharrones typewriter chartreuse vice Brooklyn. Adaptogen pour-over vibecession viral. Tote bag tonx DIY microdosing. Pickled selvage bespoke small batch, blue bottle twee tacos jean shorts before they sold out chicharrones solarpunk. Hoodie taiyaki poutine jianbing chambray.</p>
</block>
<block style="--value: 7;">
<h2>Current Status</h2>
<p>Polaroid retro pork belly yes plz bitters, viral chicharrones typewriter chartreuse vice Brooklyn. Adaptogen pour-over vibecession viral. Tote bag tonx DIY microdosing. Pickled selvage bespoke small batch, blue bottle twee tacos jean shorts before they sold out chicharrones solarpunk. Hoodie taiyaki poutine jianbing chambray.</p>
</block>
<block>
<h2>Planned Work</h2>
<p>Polaroid retro pork belly yes plz bitters, viral chicharrones typewriter chartreuse vice Brooklyn. Adaptogen pour-over vibecession viral. Tote bag tonx DIY microdosing. Pickled selvage bespoke small batch, blue bottle twee tacos jean shorts before they sold out chicharrones solarpunk. Hoodie taiyaki poutine jianbing chambray.</p>
</block>
<block style="--value: 2; --text: 9">
<h2>Read The Code</h2>
<p>Polaroid retro pork belly yes plz bitters, viral chicharrones typewriter chartreuse vice Brooklyn. Adaptogen pour-over vibecession viral. Tote bag tonx DIY microdosing. Pickled selvage bespoke small batch, blue bottle twee tacos jean shorts before they sold out chicharrones solarpunk. Hoodie taiyaki poutine jianbing chambray.</p>
<button><a href="https://git.learnjsthehardway.com/learn-code-the-hard-way/turings-tarpit">View the Git</a></button>
</block>
</blockstart>

View file

@ -1,45 +0,0 @@
<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>
<block style="--value: 7">
<h1 x-text="Stream.title"></h1>
<div>
<p x-text="Stream.description"></p>
</div>
</block>
<block>
<p>Qui animated corpse, cricket bat max brucks terribilem incessu zomby. The voodoo sacerdos flesh eater, suscitat mortuos comedere carnem virus. Zonbi tattered for solum oculi eorum defunctis go lum cerebro. Nescio brains an Undead zombies. Sicut malus putrid voodoo horror.</p>
</block>
<block>
<h2>Links Posted</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>
<block style="--value: 7; --border: 1px;" class="horizontal">
<grid style="--cols: 2">
<shape>Left Image</shape>
<div>
<h3>I stream on Twitch.</h3>
<p>I stream every day at 10AM/10PM EST time. 60% of the time it's a chill laid back stream with only programming and a bit of talking about programming. 30% of the time it's art for games I'm making. 10% of the time it's games I'm playing.</p>
<a href="https://twitch.tv/zedashaw"><button style="--value: 2; --text: 9">Watch me on Twitch</button></a>
</div>
</grid>
</block>
</blockstart>
</div>