diff options
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>  | 
