summary refs log tree commit diff homepage
path: root/docs/source/_templates/recplayer.html
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2020-07-20 21:40:25 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2020-07-20 21:46:31 +0700
commit1b7bf9833d37246397f117f4ce6d95ae7211349b (patch)
tree3b7d3d805c2d2be05c6cc7a0cfce57f22cd24e75 /docs/source/_templates/recplayer.html
parentd3839f160e5020967b2b23bd21ebd7c941012162 (diff)
downloadbrutalmaze-1b7bf9833d37246397f117f4ce6d95ae7211349b.tar.gz
Use Sphinx to replace wiki
Diffstat (limited to 'docs/source/_templates/recplayer.html')
-rw-r--r--docs/source/_templates/recplayer.html28
1 files changed, 28 insertions, 0 deletions
diff --git a/docs/source/_templates/recplayer.html b/docs/source/_templates/recplayer.html
new file mode 100644
index 0000000..59df55a
--- /dev/null
+++ b/docs/source/_templates/recplayer.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<meta charset='utf-8'>
+<title>Brutal Maze record player</title>
+<link rel='stylesheet' type='text/css' href='_static/recplayer.css'>
+<script src='_static/brutalma.js'></script>
+
+<body>
+<div id='input'>
+  <input id='record' type='text' name='record' value='record.json'>
+  <input id='button' type='button' value='Play JSON record'>
+</div>
+<canvas id='canvas' width='640' height='480'></canvas>
+<script>
+    // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+    var canvas = document.getElementById('canvas');
+    resizeCanvas(canvas);
+    window.onresize = function() {resizeCanvas(canvas)};
+    document.getElementById('record').onkeypress = function (event) {
+        if (event.key == 'Enter') {
+            playJSON();
+        }
+    };
+    document.getElementById('button').onclick = playJSON;
+    // @license-end
+</script>
+</body>
+</html>