]> git.cworth.org Git - lmno.games/commitdiff
tictactoe: Put in place the standard top-level page
authorCarl Worth <cworth@cworth.org>
Tue, 26 May 2020 03:45:58 +0000 (20:45 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 26 May 2020 03:53:38 +0000 (20:53 -0700)
Specifically, one which allows for hosting a new game, (using the
generic lmno_new function). Meanwhile, the game-specific page is moved
to tictactoe/game.html.

tictactoe/game.html [new file with mode: 0644]
tictactoe/index.html

diff --git a/tictactoe/game.html b/tictactoe/game.html
new file mode 100644 (file)
index 0000000..b9136b7
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+
+    <title>Tic-tac-toe</title>
+
+    <link rel="stylesheet" href="/reset.css" type="text/css" />
+    <link rel="stylesheet" href="/style.css" type="text/css" />
+    <link rel="stylesheet" href="tictactoe.css" type="text/css" />
+
+    <script src="/react.js"></script>
+    <script src="/react-dom.js"></script>
+    <script type="module" src="tictactoe.js"></script>
+  </head>
+  <body>
+
+    <div id="page">
+
+      <h1>Tic Tac Toe</h1>
+
+      <p>
+        Just the classic game.
+      </p>
+
+      <div id="message-area">
+      </div>
+
+      <div id="tictactoe"></div>
+
+    </div>
+
+  </body>
+</html>
index b9136b7a5ceda9c4595fb8add62fe4839aad3773..563973b498d96cfa9208fcaf44ef13c5d0dba02c 100644 (file)
@@ -4,15 +4,12 @@
     <meta charset="utf-8"/>
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 
     <meta charset="utf-8"/>
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 
-    <title>Tic-tac-toe</title>
+    <title>Tic Tac Toe</title>
 
     <link rel="stylesheet" href="/reset.css" type="text/css" />
     <link rel="stylesheet" href="/style.css" type="text/css" />
 
     <link rel="stylesheet" href="/reset.css" type="text/css" />
     <link rel="stylesheet" href="/style.css" type="text/css" />
-    <link rel="stylesheet" href="tictactoe.css" type="text/css" />
 
 
-    <script src="/react.js"></script>
-    <script src="/react-dom.js"></script>
-    <script type="module" src="tictactoe.js"></script>
+    <script src="/lmno.js"></script>
   </head>
   <body>
 
   </head>
   <body>
 
       <div id="message-area">
       </div>
 
       <div id="message-area">
       </div>
 
-      <div id="tictactoe"></div>
+      <form onsubmit="lmno_new('tictactoe'); return false;">
+        <button type="submit">
+          Host a new game
+        </button>
+      </form>
 
     </div>
 
 
     </div>