diff options
author | stale <redkugelblitzin@gmail.com> | 2022-05-29 05:34:16 -0300 |
---|---|---|
committer | stale <redkugelblitzin@gmail.com> | 2022-05-29 05:34:16 -0300 |
commit | 8e8fb7c45e8088843b71cb55fede723b2f9c7ff2 (patch) | |
tree | a6fbcb4cb3ea575cac0dddb45d88ed103301dfbf /assets/index.html | |
parent | 2826d78bbfab50eab90e5a1611576f33e752b7d8 (diff) |
*really* basic public lobby
Diffstat (limited to 'assets/index.html')
-rw-r--r-- | assets/index.html | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/assets/index.html b/assets/index.html index 4571428..6fc9c46 100644 --- a/assets/index.html +++ b/assets/index.html @@ -7,7 +7,20 @@ <link rel="stylesheet" type="text/css" href="s.css"> </head> <body> - <form method="post" action="r"> + <div id="rlist" class="cent"></div> + <script> + let rlist = document.getElementById('rlist'); + fetch('rlist').then(r => r.json()).then(rooms => { + rooms.forEach(x => { + let a = document.createElement('a'); + a.appendChild(document.createTextNode(x)); + a.href = 'room/' + x; + rlist.append(a); + rlist.append(document.createElement('br')); + }); + }); + </script> + <form method="post" action="r" class="cent"> <fieldset> <legend>-={ Create a new room }=-</legend> <label>room name<input name="rname" type="text" autofocus></label><br> @@ -19,8 +32,8 @@ in every<input name="rratiod" type="number" value="8" required> tiles are mines </label><br> - <label>public, ie. shown in the lobby <input name="raccess" type="checkbox"></label><br> - <label>always safe first move <input name="ralwayssafe1move" type="checkbox"></label><br> + <label>public, ie. shown in the lobby <input name="raccess" type="checkbox" checked></label><br> + <label>always safe first move <input name="ralwayssafe1move" type="checkbox" checked></label><br> <label>player limit<input name="rlimit" type="number" value="32"></label><br> <button>create</button> </fieldset> |