about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-01-07 00:15:56 -0500
committerJune McEnroe <june@causal.agency>2019-01-07 00:15:56 -0500
commitf4a050a8e39d3028d31ff57575bb4af32705f2fb (patch)
tree20adf1a12a25644782b62e154f764b58c813ee52
parentAdd meta viewport to explore (diff)
downloadtorus-f4a050a8e39d3028d31ff57575bb4af32705f2fb.tar.gz
torus-f4a050a8e39d3028d31ff57575bb4af32705f2fb.zip
Add HOME button, ssh link, AGPL notice to explore
-rw-r--r--explore.html41
1 files changed, 30 insertions, 11 deletions
diff --git a/explore.html b/explore.html
index 0f898fa..43ab9b1 100644
--- a/explore.html
+++ b/explore.html
@@ -3,28 +3,43 @@
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <style>
 	body {
+		color: white;
 		background-color: black;
 		text-align: center;
 	}
-	table { margin: auto; }
-	button { font-size: 250%; }
+	a { color: white; }
 	img {
 		max-width: 100%;
 		image-rendering: pixelated;
 	}
+	table { margin: auto; }
+	button.arr { font-size: 150%; }
 </style>
-<img id="tile" src="tile.png">
+<p>
+<a href="ssh://torus@ascii.town"><code>ssh torus@ascii.town</code></a>
+<p>
+<img id="tile" src="https://ascii.town/tile.png">
 <table>
 	<tr>
-		<td rowspan="3"><button id="larr" type="button">&larr;</button></td>
-		<td><button id="uarr" type="button">&uarr;</button></td>
-		<td rowspan="3"><button id="rarr" type="button">&rarr;</button></td>
+		<td rowspan="2">
+			<button id="larr" class="arr" type="button">&larr;</button>
+		</td>
+		<td><button id="uarr" class="arr" type="button">&uarr;</button></td>
+		<td rowspan="2">
+			<button id="rarr" class="arr" type="button">&rarr;</button>
+		</td>
+	</tr>
+	<tr>
+		<td><button id="darr" class="arr" type="button">&darr;</button></td>
 	</tr>
-	<tr></tr>
 	<tr>
-		<td><button id="darr" type="button">&darr;</button</td>
+		<td colspan="3"><button id="home" type="button">HOME</button></td>
 	</tr>
 </table>
+<p>
+This is AGPLv3 Free Software!
+Code is available from
+<a href="https://code.causal.agency/june/torus">Code Toilet</a>.
 
 <script>
 	let tile = document.getElementById("tile");
@@ -42,17 +57,21 @@
 	}
 	setImage();
 
-	function move(dx, dy) {
-		state.set("x", +state.get("x") + dx);
-		state.set("y", +state.get("y") + dy);
+	function setState(x, y) {
+		state.set("x", x);
+		state.set("y", y);
 		history.pushState(state.toString(), "", "#" + state.toString());
 		setImage();
 	}
+	function move(dx, dy) {
+		setState(+state.get("x") + dx, +state.get("y") + dy);
+	}
 	window.onpopstate = function(event) {
 		state = new URLSearchParams(event.state);
 		setImage();
 	}
 	
+	home.onclick = () => setState(0, 0);
 	larr.onclick = () => move(-1,  0);
 	darr.onclick = () => move( 0,  1);
 	uarr.onclick = () => move( 0, -1);
colspan='3' class='logmsg'> I know it's already published under a permissive license in what is probably its final form, but I want to license it AGPL anyway on principle following some conversations I had about open source, corporations and copyleft. 2017-09-01Revert "Add client readOnly mode"June McEnroe This reverts commit 9a6c9c91c8092603b914cc0b3085d059e162ca29. 2017-09-01Remove clientRemove call from clientCastJune McEnroe If an error occurs on a client socket during a broadcast, that client will show up in the kqueue loop with EV_EOF and get removed that way. Tested by sending SIGKILL to a client and watching its cursor disappear. 2017-09-01Add client readOnly modeJune McEnroe 2017-08-31Clean up merge toolJune McEnroe Choose the version with the most recent access if the modify times are the same. 2017-08-31Choose B for tiles with equal modify timesJune McEnroe This way newer access counts and times will be preserved. 2017-08-31Add quick data file merge toolJune McEnroe Hopefully I won't have to use it ever again. 2017-08-30Use only foreground color for selecting spawnJune McEnroe 2017-08-29Add four additional spawnsJune McEnroe 2017-08-28Add respawningJune McEnroe 2017-08-26Move license above includesJune McEnroe Why was it down there? 2017-08-26Snapshot metadataJune McEnroe 2017-08-26Add meta.c to READMEJune McEnroe 2017-08-26Use MakefileJune McEnroe