summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorRose Hogenson <rosehogenson@posteo.net>2026-07-25 10:58:28 -0700
committerRose Hogenson <rosehogenson@posteo.net>2026-07-25 10:59:30 -0700
commitde5b309e0f06e93a963e09ef13c369ae7deeccc9 (patch)
tree87f0dec5650648640c6fc3119f32f7631b323f53 /templates
parent0e9b550cbeec4192dff7f760936fe1d85056a5f6 (diff)
downloadroseh.moe-de5b309e0f06e93a963e09ef13c369ae7deeccc9.tar.zst
Port a game I wrote a long time ago to JS
Diffstat (limited to 'templates')
-rw-r--r--templates/games/index.html.template8
-rw-r--r--templates/games/pong.html.template4
-rw-r--r--templates/games/stallman-shooter.html.template20
-rw-r--r--templates/index.html.template2
4 files changed, 31 insertions, 3 deletions
diff --git a/templates/games/index.html.template b/templates/games/index.html.template
new file mode 100644
index 0000000..a2e930b
--- /dev/null
+++ b/templates/games/index.html.template
@@ -0,0 +1,8 @@
+{{define "head"}}<title>Games</title>{{end}}
+
+<section>
+ <ul>
+ <li><a href="/games/pong">Pong</a> (warning: loud)</li>
+ <li><a href="/games/stallman">Stallman shooter</a></li>
+ </ul>
+</section>
diff --git a/templates/games/pong.html.template b/templates/games/pong.html.template
index 777e0d0..a221023 100644
--- a/templates/games/pong.html.template
+++ b/templates/games/pong.html.template
@@ -2,8 +2,8 @@
<html lang="en" style="width:100%;height:100%;margin:0;padding:0">
<head>
<title>Pong</title>
- <link rel="icon" href="/static/pong/icon.webp">
- <script defer src="/static/pong/pong.js"></script>
+ <link rel="icon" href="/static/games/pong/icon.webp">
+ <script defer src="/static/games/pong/pong.js"></script>
</head>
<body style="width:100%;height:100%;margin:0;padding:0">
<canvas id="pong" style="display:block;margin:0;padding:0"></canvas>
diff --git a/templates/games/stallman-shooter.html.template b/templates/games/stallman-shooter.html.template
new file mode 100644
index 0000000..bf1f843
--- /dev/null
+++ b/templates/games/stallman-shooter.html.template
@@ -0,0 +1,20 @@
+{{define "head"}}
+ <title>Stallman shooter</title>
+ <link rel="modulepreload" href="/static/games/stallman-shooter/constants.js">
+ <link rel="modulepreload" href="/static/games/stallman-shooter/gates.js">
+ <link rel="modulepreload" href="/static/games/stallman-shooter/player.js">
+ <link rel="modulepreload" href="/static/games/stallman-shooter/state.js">
+ <script type="module" src="/static/games/stallman-shooter/main.js"></script>
+{{end}}
+
+<img id="introduction" src="/static/games/stallman-shooter/assets/introduction.webp" hidden>
+<img id="loss" src="/static/games/stallman-shooter/assets/loss.webp" hidden>
+<img id="victory" src="/static/games/stallman-shooter/assets/victory.webp" hidden>
+<img id="stallman" src="/static/games/stallman-shooter/assets/stallman.webp" hidden>
+<img id="gates" src="/static/games/stallman-shooter/assets/gates.webp" hidden>
+<img id="binary-blob" src="/static/games/stallman-shooter/assets/binary_blob.webp" hidden>
+<img id="player-pepp" src="/static/games/stallman-shooter/assets/player_pepp.webp" hidden>
+
+<section>
+ <canvas id="canvas" width="800" height="600"></canvas>
+</section>
diff --git a/templates/index.html.template b/templates/index.html.template
index 371f047..1723ffb 100644
--- a/templates/index.html.template
+++ b/templates/index.html.template
@@ -9,6 +9,6 @@
<img src="/static/index/kanna.webp" alt="A dragon loli" style="border-radius:50%;margin:-145px auto 20px">
</div>
- <p><a href="/pong">Games?</a> (Warning: loud)</p>
+ <p><a href="/games/">Games?</a></p>
<p><a href="/wormhole">Magic wormhole</a></p>
</section>