diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-11-10 22:27:46 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-11-13 18:38:17 +0100 |
commit | 0d0dab23fb0ecf16a2abf54295746d7dbd87c2d7 (patch) | |
tree | 84c1ba816d81659860630fa7eb5a798605425161 /views/games.ejs | |
parent | 66450e7666abdaced2347825a4b9e13bc0528251 (diff) | |
download | server-0d0dab23fb0ecf16a2abf54295746d7dbd87c2d7.tar.gz |
Massive SQL cleanup.
Diffstat (limited to 'views/games.ejs')
-rw-r--r-- | views/games.ejs | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/views/games.ejs b/views/games.ejs index b74dbba..acb94b6 100644 --- a/views/games.ejs +++ b/views/games.ejs @@ -1,40 +1,37 @@ <%- include('header', { title: "All Public Games", refresh: (user ? 300 : 0) }) %> -<style> -td.nowrap a { color: black; text-decoration: none; } -</style> <h2>Open</h2> -<table class="wide"> +<table class="game"> <tr><th>ID<th>Title<th>Scenario<th>Players<th>Description<th>Created<th> <% if (open_games.length > 0) { %> <% open_games.forEach((row) => { %> <tr> -<td><%= row.game_id %> -<td class="nowrap"><a href="/info/<%= row.title_id %>"><%= row.title_name %></a> -<td><%= row.scenario %> -<td><%- row.player_names || row.owner_name %> -<td><%= row.description %> -<td class="nowrap"><%= row.ctime %> -<td><a href="/join/<%= row.game_id %>">Join</a> +<td class="id"><%= row.game_id %> +<td class="title"><a href="/info/<%= row.title_id %>"><%= row.title_name %></a> +<td class="scenario"><%= row.scenario %> +<td class="players"><%- row.player_names || row.owner_name %> +<td class="description"><%= row.description %> +<td class="time"><%= row.ctime %> +<td class="command"><a href="/join/<%= row.game_id %>">Join</a> <% }); } else { %> <tr><td colspan="7">No open games. <% } %> </table> <h2>Active</h2> -<table class="wide"> +<table class="game"> <tr><th>ID<th>Title<th>Scenario<th>Players<th>Description<th>Changed<th>Active<th> <% if (active_games.length > 0) { %> <% active_games.forEach((row) => { %> <tr> -<td><%= row.game_id %> -<td class="nowrap"><a href="/info/<%= row.title_id %>"><%= row.title_name %></a> -<td><%= row.scenario %> -<td><%- row.player_names %> -<td><%= row.description %> -<td class="nowrap"><%= row.mtime %> -<td class="<%= row.is_your_turn ? "is_your_turn" : "" %>"><%= row.active_role %> -<td><a href="/join/<%= row.game_id %>">Enter</a> +<td class="id"><%= row.game_id %> +<td class="title"><a href="/info/<%= row.title_id %>"><%= row.title_name %></a> +<td class="scenario"><%= row.scenario %> +<td class="players"><%- row.player_names %> +<td class="description"><%= row.description %> +<td class="time"><%= row.mtime %> +<td class="role <%= row.is_active ? "is_active" : "" %>"><%= row.active %> +<td class="command"><a href="/join/<%= row.game_id %>">Enter</a> <% }); } else { %> <tr><td colspan="8">No active games. <% } %> |