summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-11-10 22:27:46 +0100
committerTor Andersson <tor@ccxvii.net>2021-11-13 18:38:17 +0100
commit0d0dab23fb0ecf16a2abf54295746d7dbd87c2d7 (patch)
tree84c1ba816d81659860630fa7eb5a798605425161 /views
parent66450e7666abdaced2347825a4b9e13bc0528251 (diff)
downloadserver-0d0dab23fb0ecf16a2abf54295746d7dbd87c2d7.tar.gz
Massive SQL cleanup.
Diffstat (limited to 'views')
-rw-r--r--views/change_about.ejs2
-rw-r--r--views/forum_reply.ejs13
-rw-r--r--views/forum_thread.ejs15
-rw-r--r--views/forum_view.ejs25
-rw-r--r--views/games.ejs37
-rw-r--r--views/header.ejs6
-rw-r--r--views/info.ejs47
-rw-r--r--views/join.ejs3
-rw-r--r--views/message_inbox.ejs13
-rw-r--r--views/message_outbox.ejs13
-rw-r--r--views/message_read.ejs24
-rw-r--r--views/message_send.ejs11
-rw-r--r--views/profile.ejs85
-rw-r--r--views/stats.ejs2
-rw-r--r--views/user.ejs7
-rw-r--r--views/users.ejs6
16 files changed, 134 insertions, 175 deletions
diff --git a/views/change_about.ejs b/views/change_about.ejs
index 249f9be..c87fc55 100644
--- a/views/change_about.ejs
+++ b/views/change_about.ejs
@@ -1,4 +1,4 @@
-<%- include('header', { title: "Change Profile" }) %>
+<%- include('header', { title: "Change profile text" }) %>
<style>
textarea { width: 100%; max-width: 45em; }
</style>
diff --git a/views/forum_reply.ejs b/views/forum_reply.ejs
index bf27492..85bafad 100644
--- a/views/forum_reply.ejs
+++ b/views/forum_reply.ejs
@@ -1,16 +1,13 @@
<%- include('header', { title: thread.subject }) %>
<style>
input, textarea { width: 100%; max-width: 45em; }
-table { width: 100%; max-width: 50em; }
-td.body { white-space: pre-wrap; padding: 10px 10px; }
-th.author { border-right: none; }
-th.time { text-align: right; border-left: none; font-weight: normal; }
+table .author { border-right: none; }
+table .time { border-left: none; font-weight: normal; }
</style>
-<table>
+<table class="post">
<tr>
-<th class="nowrap author"><%= post.author_name %>
-<th class="nowrap time"><%= post.ctime %>
-<%= post.edited ? "(edited " + post.mtime + ")" : "" %>
+<th class="author"><%= post.author_name %>
+<th class="time"><%= post.ctime %> <%= post.edited ? "(edited " + post.mtime + ")" : "" %>
<tr>
<td class="body" colspan="2"><%- post.body %></td>
</table>
diff --git a/views/forum_thread.ejs b/views/forum_thread.ejs
index 0041f20..7232bce 100644
--- a/views/forum_thread.ejs
+++ b/views/forum_thread.ejs
@@ -1,18 +1,15 @@
<%- include('header', { title: thread.subject }) %>
<style>
-table { width: 100%; max-width: 50em; }
-td.body { white-space: pre-wrap; padding: 10px 10px; }
-th a { color: black; text-decoration: none; }
-th.author { border-right: none; }
-th.time { text-align: right; border-left: none; font-weight: normal; }
-td.edit { text-align: right; border: none; }
+table .author { border-right: none; }
+table .time { border-left: none; font-weight: normal; }
+table .edit { text-align: right; border: none; }
</style>
<% posts.forEach((row) => { %>
<p>
-<table>
+<table class="post">
<tr>
-<th class="nowrap author"><a href="/user/<%- row.author_name %>"><%= row.author_name %></a>
-<th class="nowrap time"><%= row.ctime %>
+<th class="author"><a href="/user/<%- row.author_name %>"><%= row.author_name %></a>
+<th class="time"><%= row.ctime %>
<%= row.edited ? "(edited " + row.mtime + ")" : "" %>
<tr>
<td class="body" colspan="2"><%- row.body %></td>
diff --git a/views/forum_view.ejs b/views/forum_view.ejs
index 5f04f3f..6838803 100644
--- a/views/forum_view.ejs
+++ b/views/forum_view.ejs
@@ -1,23 +1,18 @@
<%- include('header', { title: "Forum", refresh: 900 }) %>
-<style>
-table { width: 100%; max-width: 60em; }
-td a { color: black; text-decoration: none; }
-tfoot td { background-color: gainsboro; }
-th.replies { width: 3em; }
-th.time { width: 5em; }
-th.author { width: 10em; }
-</style>
-<table>
+<table class="post">
<thead>
-<tr><th class="subject">Subject<th class="author">Author
-<th class="replies">Replies<th class="time">Time
+<tr>
+<th class="subject">Subject
+<th class="author">Author
+<th class="replies">Replies
+<th class="time">Time
</thead>
<% threads.forEach((row) => { %>
<tr>
-<td class="ellipsis"><a href="/forum/thread/<%- row.thread_id %>"><%= row.subject %></a>
-<td class="nowrap"><a href="/user/<%- row.author_name %>"><%= row.author_name %></a>
-<td><%= row.reply_count %>
-<td class="nowrap"><%= row.mtime %>
+<td class="subject"><a href="/forum/thread/<%- row.thread_id %>"><%= row.subject %></a>
+<td class="author"><a href="/user/<%- row.author_name %>"><%= row.author_name %></a>
+<td class="replies"><%= row.replies %>
+<td class="time"><%= row.mtime %>
<% }); %>
<tfoot>
<tr>
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.
<% } %>
diff --git a/views/header.ejs b/views/header.ejs
index aed34d0..337290a 100644
--- a/views/header.ejs
+++ b/views/header.ejs
@@ -16,7 +16,7 @@
<span><a href="/forum">Forum</a></span>
<%
if (user) {
- let unread = user.unread();
+ let unread = user.unread | 0;
if (unread > 0) {
%><span><a href="/inbox">Inbox (<%= unread %>)</a></span><%
} else {
@@ -33,7 +33,7 @@
<div class="main">
<h1><%= title %></h1>
<%
- if (typeof message !== 'undefined' && message.length > 0) {
- %><p class="error"><%= Array.isArray(message) ? message.join("\n") : message %></p><%
+ if (typeof flash !== 'undefined' && flash.length > 0) {
+ %><p class="error"><%= Array.isArray(flash) ? flash.join("\n") : flash %></p><%
}
%>
diff --git a/views/info.ejs b/views/info.ejs
index 159e732..f97b04e 100644
--- a/views/info.ejs
+++ b/views/info.ejs
@@ -1,7 +1,4 @@
<%- include('header', { title: title.title_name, refresh: (user ? 300 : 0) }) %>
-<style>
-td.names a { color: black; text-decoration: none; }
-</style>
<img class="logo" src="/<%= title.title_id %>/cover.jpg">
<%- include('../public/' + title.title_id + '/about.html') %>
<p>
@@ -11,17 +8,17 @@ Read more about the game on
<% if (user) { %>
<h2>Open Games</h2>
-<table class="wide">
+<table class="game">
<tr><th>ID<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="id"><%= row.game_id %>
<td><%= row.scenario %>
-<td class="names"><%- row.player_names || `<a href="/user/${row.owner_name}">${row.owner_name}</a>` %>
-<td><%= row.description %>
-<td class="nowrap"><%= row.ctime %>
-<td><a href="/join/<%= row.game_id %>">Join</a>
+<td class="players"><%- row.player_names || `<a href="/user/${row.owner_name}">${row.owner_name}</a>` %>
+<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="6">No open games.
<% } %>
@@ -32,34 +29,34 @@ Read more about the game on
<% if (active_games.length > 0) { %>
<h2>Active Games</h2>
-<table class="wide">
+<table class="game">
<tr><th>ID<th>Scenario<th>Players<th>Description<th>Changed<th>Turn<th>
<% active_games.forEach((row) => { %>
<tr>
-<td><%= row.game_id %>
-<td><%= row.scenario %>
-<td class="names"><%- 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="scenario"><%= row.scenario %>
+<td class="players"><%- row.player_names %>
+<td class="description"><%= row.description %>
+<td class="time"><%= row.mtime %>
+<td class="<%= row.is_active ? "role is_active" : "role" %>"><%= row.active %>
+<td class="command"><a href="/join/<%= row.game_id %>">Enter</a>
<% }); %>
</table>
<% } %>
<% if (finished_games.length > 0) { %>
<h2>Finished Games</h2>
-<table class="wide">
+<table class="game">
<tr><th>ID<th>Scenario<th>Players<th>Description<th>Finished<th>Result<th>
<% finished_games.forEach((row) => { %>
<tr>
-<td><%= row.game_id %>
-<td><%= row.scenario %>
-<td class="names"><%- row.player_names %>
-<td><%= row.description %>
-<td class="nowrap"><%= row.mtime %>
-<td><%= row.result %>
-<td><a href="/join/<%= row.game_id %>">View</a>
+<td class="id"><%= row.game_id %>
+<td class="scenario"><%= row.scenario %>
+<td class="players"><%- row.player_names %>
+<td class="description"><%= row.description %>
+<td class="time"><%= row.mtime %>
+<td class="result"><%= row.result %>
+<td class="command"><a href="/join/<%= row.game_id %>">View</a>
<% }); %>
</table>
<% } %>
diff --git a/views/join.ejs b/views/join.ejs
index b9cf824..fa33d5c 100644
--- a/views/join.ejs
+++ b/views/join.ejs
@@ -12,6 +12,7 @@ function format_options(options) {
<style>
th, td { min-width: 10em; font-size: 16px; }
a.red { text-decoration: none; color: brown; font-size: 15px; }
+td a { text-decoration: underline; color: blue; }
.hide { display: none; }
</style>
<script>
@@ -44,7 +45,7 @@ Result: <span id="game_result"></span>
<br clear=left>
-<table>
+<table class="small">
<tr>
<% roles.forEach((role) => { %><th id="role_<%= role.replace(/ /g, '_') %>_name"><%= role %></th><% }); %>
<tr>
diff --git a/views/message_inbox.ejs b/views/message_inbox.ejs
index 16b0c46..e70e156 100644
--- a/views/message_inbox.ejs
+++ b/views/message_inbox.ejs
@@ -1,19 +1,12 @@
<%- include('header', { title: "Inbox" }) %>
-<style>
-table { width: 100%; max-width: 50em; }
-tr.unread { background-color: lightyellow; }
-td.from { width: 5em; }
-td.time { text-align: right; width: 5em; }
-td a { color:black; text-decoration: none; }
-</style>
<p><a href="/message/send">Send message</a>
-<table>
+<table class="post">
<tr><th>From<th>Subject<th>Date
<% if (messages.length > 0) { messages.forEach((row) => { %>
<tr class="<%- row.read ? "read" : "unread" %>">
-<td class="nowrap from"><a href="/user/<%- row.from_name %>"><%= row.from_name %></a>
+<td class="author"><a href="/user/<%- row.from_name %>"><%= row.from_name %></a>
<td class="subject"><a href="/message/read/<%- row.message_id %>"><%= row.subject %></a>
-<td class="nowrap time"><%= row.time %>
+<td class="time"><%= row.time %>
<% }); } else { %>
<tr><td colspan="3">No messages</td>
<% } %>
diff --git a/views/message_outbox.ejs b/views/message_outbox.ejs
index e5c53e3..c7ff379 100644
--- a/views/message_outbox.ejs
+++ b/views/message_outbox.ejs
@@ -6,20 +6,13 @@ function delete_all() {
window.location.href = "/outbox/delete";
}
</script>
-<style>
-table { width: 100%; max-width: 50em; }
-tr.unread { background-color: lemonchiffon; }
-td.to { width: 5em; }
-td.time { text-align: right; width: 5em; }
-td a { color:black; text-decoration: none; }
-</style>
-<table>
+<table class="post">
<tr><th>To<th>Subject<th>Date
<% if (messages.length > 0) { messages.forEach((row) => { %>
<tr class="<%- row.read ? "read" : "unread" %>">
-<td class="nowrap to"><a href="/user/<%- row.to_name %>"><%= row.to_name %></a>
+<td class="author"><a href="/user/<%- row.to_name %>"><%= row.to_name %></a>
<td class="subject"><a href="/message/read/<%- row.message_id %>"><%= row.subject %></a>
-<td class="nowrap time"><%= row.time %>
+<td class="time"><%= row.time %>
<% }); } else { %>
<tr><td colspan="3">No messages</td>
<% } %>
diff --git a/views/message_read.ejs b/views/message_read.ejs
index 28762cf..7b32eda 100644
--- a/views/message_read.ejs
+++ b/views/message_read.ejs
@@ -1,10 +1,4 @@
-<%- include('header', { title: mail.subject }) %>
-<style>
-table { width: 100%; max-width: 50em; }
-th { width: 5em; font-weight: normal; }
-td.body { white-space: pre-wrap; padding: 10px 10px; }
-td a { color: black; text-decoration: none; }
-</style>
+<%- include('header', { title: message.subject }) %>
<script>
function delete_message(id) {
let warning = "Are you sure you want to DELETE this message?";
@@ -15,14 +9,14 @@ function reply_message(id) {
window.location.href = "/message/reply/" + id;
}
</script>
-<table>
-<tr><th>From:<td> <a href="/user/<%- mail.from_name %>"><%= mail.from_name %></a>
-<tr><th>To:<td> <a href="/user/<%- mail.to_name %>"><%= mail.to_name %></a>
-<tr><th>Date:<td> <%= mail.time %>
-<tr><td colspan="2" class="body"><%= mail.body %></td>
+<table class="post">
+<tr><th>From:<td> <a href="/user/<%- message.from_name %>"><%= message.from_name %></a>
+<tr><th>To:<td> <a href="/user/<%- message.to_name %>"><%= message.to_name %></a>
+<tr><th>Date:<td> <%= message.time %>
+<tr><td colspan="2" class="body"><%- message.body %></td>
</table>
<p>
-<% if ( mail.from_id !== user.user_id ) { %>
-<button onclick="reply_message(<%- mail.message_id %>)">Reply</button>
+<% if ( 1 || message.from_id !== user.user_id ) { %>
+<button onclick="reply_message(<%- message.message_id %>)">Reply</button>
<% } %>
-<button onclick="delete_message(<%- mail.message_id %>)">Delete</button>
+<button onclick="delete_message(<%- message.message_id %>)">Delete</button>
diff --git a/views/message_send.ejs b/views/message_send.ejs
index 6f72d74..4dafa3a 100644
--- a/views/message_send.ejs
+++ b/views/message_send.ejs
@@ -1,6 +1,6 @@
<%- include('header', { title: "Send Message" }) %>
<style>
-input, textarea { width: 100%; max-width: 45em; }
+input, textarea { width: 100%; max-width: 45rem; }
</style>
<form action="/message/send" method="post">
<p>
@@ -8,7 +8,7 @@ To:<br>
<input id="to" type="text" name="to" size="80" maxlength="80"
onkeypress="if(event.keyCode===13){document.querySelector('#subject').focus();return false;}"
value="<%= to_name %>"
- <%= to_id === 0 ? "autofocus" : "" %>
+ <%= (to_name === "") ? "autofocus" : "" %>
required>
<p>
@@ -17,14 +17,17 @@ Subject:
<input id="subject" type="text" name="subject" size="80" maxlength="80"
onkeypress="if(event.keyCode===13){document.querySelector('#body').focus();return false;}"
value="<%= subject %>"
- <%= to_id > 0 ? "autofocus" : "" %>
+ <%= (to_name !== "" && subject === "") ? "autofocus" : "" %>
pattern=".*\S+.*"
required>
<p>
Body:
<br>
-<textarea id="body" name="body" rows="20" cols="80" maxlength="32000" required><%= body %></textarea>
+<textarea id="body" name="body" rows="20" cols="80" maxlength="32000"
+ <%= (to_name !== "" && subject !== "") ? "autofocus" : "" %>
+ required>
+<%= body %></textarea>
<p>
<button type="submit">Send</button>
</form>
diff --git a/views/profile.ejs b/views/profile.ejs
index 3c49014..1dbc1f5 100644
--- a/views/profile.ejs
+++ b/views/profile.ejs
@@ -1,10 +1,5 @@
<%- include('header', { title: "Rally the Troops!", refresh: (active_games.length > 0 ? 300 : 0) }) %>
-<style>
-td.game a, td.names a { color: black; text-decoration: none; }
-.logo { width: 80px; height: 80px; }
-</style>
-
-<img class="logo" src="<%= avatar %>" width="80" height="80">
+<img class="logo avatar" src="<%= avatar %>" width="80" height="80">
<p>
Welcome, <%= user.name %>!
<p>
@@ -12,60 +7,62 @@ Your mail address is <%= user.mail %>.
<br clear=left>
-<ul style="list-style:'\bb '">
-<li><%
- if (user.notifications) {
+<p>&#xbb;
+<%
+ if (user.notify) {
%><a href="/unsubscribe">Disable mail notifications</a><%
} else {
%><a href="/subscribe">Enable mail notifications</a><%
}
%>
-<li><a href="/change_password">Change password</a>
-<li><a href="/change_mail">Change mail address</a>
-<li><a href="/change_name">Change name</a>
-<li><a href="/change_about">Change profile text</a>
-<li><a href="/logout">Logout</a>
-</ul>
+<br>&#xbb;
+Change
+<a href="/change_password">password</a>,
+<a href="/change_mail">mail address</a>,
+<a href="/change_name">name</a>,
+or <a href="/change_about">profile text</a>.
+<br>&#xbb;
+<a href="/logout">Logout</a>
<% if (open_games.length > 0) { %>
<h2>Open Games</h2>
-<table class="wide">
+<table class="game">
<tr><th>ID<th>Game<th>Scenario<th>Players<th>Description<th>Created<th>
<% open_games.forEach((row) => { %>
<tr>
-<td><%= row.game_id %>
-<td class="nowrap game"><a href="/info/<%= row.title_id %>"><%= row.title_name %></a>
-<td><%= row.scenario %>
-<td class="names"><%- row.player_names %>
-<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="name"><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.ctime %>
+<td class="command"><a href="/join/<%= row.game_id %>">Join</a>
<% }); %>
</table>
<% } %>
<% if (active_games.length > 0) { %>
<h2>Active Games</h2>
-<table class="wide">
+<table class="game">
<tr><th>ID<th>Game<th>Scenario<th>Players<th>Description<th>Changed<th>Turn<th>
<% active_games.forEach((row) => { %>
<tr>
-<td><%= row.game_id %>
-<td class="nowrap game"><a href="/info/<%= row.title_id %>"><%= row.title_name %></a>
-<td><%= row.scenario %>
-<td class="names"><%- row.player_names %>
-<td><%= row.description %>
-<td class="nowrap"><%= row.mtime %>
+<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 %>
<%
- if (row.is_your_turn) {
- %><td class="is_your_turn"><%= row.active_role %><%
+ if (row.is_active) {
+ %><td class="role is_active"><%= row.active %><%
} else {
- %><td><%= row.active_role %><%
+ %><td class="role"><%= row.active %><%
}
if (row.is_shared) {
- %><td><a href="/join/<%= row.game_id %>">Enter</a><%
+ %><td class="command"><a href="/join/<%= row.game_id %>">Enter</a><%
} else {
- %><td><a href="/play/<%= row.game_id %>">Play</a><%
+ %><td class="command"><a href="/play/<%= row.game_id %>">Play</a><%
}
%>
<% }); %>
@@ -74,18 +71,18 @@ Your mail address is <%= user.mail %>.
<% if (finished_games.length > 0) { %>
<h2>Finished Games</h2>
-<table class="wide">
+<table class="game">
<tr><th>ID<th>Game<th>Scenario<th>Players<th>Description<th>Finished<th>Result<th>
<% finished_games.forEach((row) => { %>
<tr>
-<td><%= row.game_id %>
-<td class="nowrap game"><a href="/info/<%= row.title_id %>"><%= row.title_name %></a>
-<td><%= row.scenario %>
-<td class="names"><%- row.player_names %>
-<td><%= row.description %>
-<td class="nowrap"><%= row.mtime %>
-<td><%= row.result %>
-<td><a href="/join/<%= row.game_id %>">View</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="result"><%= row.result %>
+<td class="command"><a href="/join/<%= row.game_id %>">View</a>
<% }); %>
</table>
<% } %>
diff --git a/views/stats.ejs b/views/stats.ejs
index 64a6303..9e07aaf 100644
--- a/views/stats.ejs
+++ b/views/stats.ejs
@@ -17,7 +17,7 @@
for (let title_id in title_name_map) {
let scenarios = title_rule_map[title_id].scenarios;
let roles = title_role_map[title_id].concat(['Draw']);
- %><tr><th><%= title_name_map[title_id] %><%
+ %><tr><th><%= title_name_map[title_id].title_name %><%
roles.forEach(role => {
%><th><%= role %><%
});
diff --git a/views/user.ejs b/views/user.ejs
index 9da706c..8fd1d08 100644
--- a/views/user.ejs
+++ b/views/user.ejs
@@ -1,8 +1,5 @@
<%- include('header', { title: who.name }) %>
-<style>
-.logo { width: 80px; height: 80px; }
-</style>
-<img class="logo" src="<%= who.avatar %>" width="80" height="80">
+<img class="avatar" src="<%= who.avatar %>" width="80" height="80">
<% if (who.about) { %>
<p style="white-space:pre-wrap;font-style:italic"><%= who.about %></p>
<% } else { %>
@@ -11,7 +8,7 @@
<p>
Member since <%= who.ctime %>.
<p>
-Was last seen <%= who.atime %>.
+Last seen <%= who.atime %>.
<% if (user) { %>
<p>
<a href="/message/send/<%- who.name %>">Send message</a>
diff --git a/views/users.ejs b/views/users.ejs
index d6e4d4a..9255d04 100644
--- a/views/users.ejs
+++ b/views/users.ejs
@@ -3,14 +3,12 @@
td.avatar{padding:0;width:80px;}
td.avatar img{display:block;width:80px;height:80px;}
</style>
-
-<table class="wide">
+<table class="post">
<tr><th>Avatar<th>Name<th>Member since<th>Last seen
-
<% userList.forEach((row) => { %>
<tr>
<td class="avatar"><img src="<%= row.avatar %>">
-<td><a href="/user/<%= row.name %>"><%= row.name %></a>
+<td class="name"><a href="/user/<%= row.name %>"><%= row.name %></a>
<td><%= row.ctime %>
<td><%= row.atime %>
<% }); %>