]> git.cworth.org Git - lmno.games/blob - empires/index.html
Implement a very simple toolbar for the host to use
[lmno.games] / empires / index.html
1 <!DOCTYPE html>
2 <html>
3   <head>
4     <meta charset="utf-8"/>
5     <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
6
7     <title>The Game of Empires</title>
8
9     <link rel="stylesheet" href="reset.css" type="text/css" />
10     <link rel="stylesheet" href="style.css" type="text/css" />
11   </head>
12 <body>
13
14   <script src="empires-client.js"></script>
15
16 <div id="page">
17
18   <span style="float:right;cursor:pointer" onclick="toggle_host_tools()">
19     ⚙
20   </span>
21
22   <div id="host-tools">
23     <button onclick="post_reveal()">
24       Reveal Characters
25     </button>
26     <button onclick="post_start()">
27       Start Game
28     </button>
29     <button onclick="post_reset()">
30       Reset Game
31     </button>
32   </div>
33
34   <div id="message-area">
35   </div>
36
37   <div id="loading" class="show-state-none">
38     <h1>The Game of Empires</h1>
39
40     <p>
41       Contacting server. Please wait...
42     </p>
43   </div>
44
45   <div id="pre-game" class="show-state-join">
46
47     <h1>The Game of Empires</h1>
48
49     <p>
50       To join the game, type your own name below. Also, choose the name
51       of a character that you want to play as. This can be anyone (real
52       or fictional) that everyone playing the game would be likely to
53       know, (for example "Albert Einstein" or "Harry Potter").
54     </p>
55
56     <p>
57       Note: After you have joined the game, another player can use this
58       same device to join the game as well.
59     </p>
60
61     <!-- The return false prevents the page from being reloaded -->
62     <form id="register-form" onsubmit="register(this); return false">
63       <div class="form-row medium left">
64         <label for="name">Your name</label>
65         <input type="text" id="name" required>
66       </div>
67
68       <div class="form-row medium right">
69         <label for="character">Character name</label>
70         <input type="text" id="character" autocomplete="off" required>
71       </div>
72
73       <div class="form-row large">
74         <button type="submit">
75           Join game
76         </button>
77       </div>
78     </form>
79
80   </div>
81
82   <div class="show-state-reveal">
83     <h1>Watch and memorize each character!</h1>
84
85     <span id="character-reveal"></span>
86   </div>
87
88   <div class="hide-state-reveal" id="players-div">
89     <h1>Players in the game</h1>
90
91     <ul id="players">
92     </ul>
93
94   </div>
95
96 </div>
97 </body>
98 </html>