Commit 595fb6e0c5

595fb6e0c54d58b915d3cf5946a44a1eb67b5d5f

parent: 31eb491152

Verified · cmc

cmc <hello@cleberg.net> · 2026-03-23 22:04 UTC

add start screen, single-view state system, and unified death node

Layout: unified · split

index.html +28 −21
@@ -4,8 +4,27 @@
44<meta name="viewport" content="width=device-width,initial-scale=1">
55<title>Micro Roguelike</title>
66
7<h1>Micro Roguelike</h1>
8<p>Choose a path. Learn the dungeon. Die often.</p>
7<style>
8section{display:none;min-height:100vh}
9#start:target,
10#gate:target,
11#bones:target,
12#beast:target,
13#hall:target,
14#pit:target,
15#idol:target,
16#crack:target,
17#vault:target,
18#death:target,
19#win:target{display:block}
20body:not(:target) #start{display:block}
21</style>
22
23<section id="start">
24 <h1>Micro Roguelike</h1>
25 <p>Choose a path. Learn the dungeon. Die often.</p>
26 <p><a href="#gate">Start</a></p>
27</section>
928
1029<section id="gate">
1130 <h2>Gate</h2>
@@ -29,8 +48,7 @@
2948<section id="beast">
3049 <h2>Beast</h2>
3150 <p>A sleeping beast opens one eye.</p>
32 <p><strong>Eaten.</strong></p>
33 <p><a href="#gate">Again</a></p>
51 <p><a href="#death">Continue</a></p>
3452</section>
3553
3654<section id="hall">
@@ -47,7 +65,7 @@
4765 <h2>Pit</h2>
4866 <p>A black pit cuts the room in two. Too wide. Dark below.</p>
4967 <p>
50 <a href="#fell">Jump</a><br>
68 <a href="#death">Jump</a><br>
5169 <a href="#vault">Edge along wall</a>
5270 </p>
5371</section>
@@ -56,7 +74,7 @@
5674 <h2>Idol</h2>
5775 <p>A gold idol watches. Coins glitter at its feet. Its head is bowed.</p>
5876 <p>
59 <a href="#cursed">Take gold</a><br>
77 <a href="#death">Take gold</a><br>
6078 <a href="#crack">Bow</a><br>
6179 <a href="#hall">Back</a>
6280 </p>
@@ -75,27 +93,15 @@
7593 <h2>Vault</h2>
7694 <p>A crown on stone. A small key beside it.</p>
7795 <p>
78 <a href="#wrongking">Take crown</a><br>
96 <a href="#death">Take crown</a><br>
7997 <a href="#win">Take key</a><br>
8098 <a href="#gate">Leave</a>
8199 </p>
82100</section>
83101
84<section id="fell">
85 <h2>Death</h2>
86 <p><strong>Fell.</strong></p>
87 <p><a href="#gate">Again</a></p>
88</section>
89
90<section id="cursed">
91 <h2>Death</h2>
92 <p><strong>Cursed.</strong></p>
93 <p><a href="#gate">Again</a></p>
94</section>
95
96<section id="wrongking">
102<section id="death">
97103 <h2>Death</h2>
98 <p><strong>Wrong king.</strong></p>
104 <p>You died.</p>
99105 <p><a href="#gate">Again</a></p>
100106</section>
101107
@@ -105,4 +111,5 @@
105111 <p>The outer gate opens. Dawn.</p>
106112 <p><a href="#gate">Again</a></p>
107113</section>
114
108115</html>