{{define "worldlobby"}}
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>worlds</title>
  </head>
  <body>
    <h1> worlds </h1><br>
    <h2> current Worlds </h2><br>
    <table style="width:100%">
            <tr>
              <th>World</th>
              <th>Users</th>
              <th></th>
            </tr>
            {{range $world:= .Worlds }}
            <tr>
              <td>{{$world.GetName}}</td>
              <td>{{range $user:= $world.GetUsers}}{{$user.Name}} {{end}}</td>
              <form method="post" action="world/join" id="join"> <input type="hidden" name="worldname" value="{{$world.Name}}" > <button type="submit">Join</button></form>
            </tr>
            {{end}}
    </table>
    <hr>
    <h2> new World </h2>
    <form method="post" action="world" id="newworld">
            <label class="h2" form="newworld">Create World</label><br>
            <label for="worldname">worldname</label>
            <input type="text" name="worldname" id="worldname" maxlength="30"><br>
            <button type="submit">create World</button><br>
    </form>
</body>
</html>
{{end}}