From 1a71184bcbf714d266e80d186fd666d393ed5981 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 19 Nov 2021 02:45:51 +0100 Subject: Clean up stylesheets. Don't show options in game lists. --- views/profile.ejs | 136 +++++++++++++++++++++++++++--------------------------- 1 file changed, 67 insertions(+), 69 deletions(-) (limited to 'views/profile.ejs') diff --git a/views/profile.ejs b/views/profile.ejs index a001e21..a4a23fc 100644 --- a/views/profile.ejs +++ b/views/profile.ejs @@ -1,5 +1,5 @@ -<%- include('header', { title: "Rally the Troops!", refresh: (active_games.length > 0 ? 300 : 0) }) _%> - +<%- include('header', { title: "Rally the Troops!", refresh: (active_games.length > 0 ? 300 : 0) }) -%> +

Welcome, <%= user.name %>!

@@ -8,13 +8,11 @@ Your mail address is <%= user.mail %>.

» -<% - if (user.notify) { - %>Disable mail notifications<% - } else { - %>Enable mail notifications<% - } -%> +<% if (user.notify) { %> +Disable mail notifications +<% } else { %> +Enable mail notifications +<% } %>
» Change password, @@ -26,79 +24,79 @@ or profile text.
» Logout -<%_ if (open_games.length > 0) { _%> +<% if (open_games.length > 0) { %>

Open Games

- -
IDGameScenarioOptionsPlayersDescriptionCreated -<%_ open_games.forEach((row) => { _%> + + + +<% open_games.forEach((row) => { %> -
IDGameScenarioPlayersDescriptionCreated +
<%= row.game_id %> -<%= row.title_name %> -<%= row.scenario %> -<%- row.options %> -<%- row.player_names %> -<%= row.description %> -<%= row.ctime %> +<%= row.game_id %> +<%= row.title_name %> +<%= row.scenario %> +<%- row.player_names %> +<%= row.description %> +<%= row.ctime %> Join -<%_ }); _%> +<% }); %>
-<%_ } _%> +<% } %> -<%_ if (active_games.length > 0) { _%> +<% if (active_games.length > 0) { %>

Active Games

- + +<% active_games.forEach((row) => { %> -
IDGameScenarioOptionsPlayersDescriptionChangedTurn -<%_ active_games.forEach((row) => { _%> +
IDGameScenarioPlayersDescriptionChangedTurn +
<%= row.game_id %> -<%= row.title_name %> -<%= row.scenario %> -<%- row.options %> -<%- row.player_names %> -<%= row.description %> -<%= row.mtime %> -<%_ - if (row.is_active) { - %><%= row.active %><% - } else { - %><%= row.active %><% - } - if (row.is_shared) { - %>Play<% - } else { - %>Play<% - } -_%> -<%_ }); _%> +<%= row.game_id %> +<%= row.title_name %> +<%= row.scenario %> +<%- row.player_names %> +<%= row.description %> +<%= row.mtime %> +<% if (row.is_active) { %> +<%= row.active %> +<% } else { %> +<%= row.active %> +<% } %> +<% if (row.is_shared) { %> +Play +<% } else { %> +Play +<% } %> +<% }); %>
-<%_ } _%> +<% } %> -<%_ if (finished_games.length > 0) { _%> +<% if (finished_games.length > 0) { %>

Finished Games

- -
IDGameScenarioOptionsPlayersDescriptionFinishedResult -<%_ finished_games.forEach((row) => { _%> + + + +<% finished_games.forEach((row) => { %> -
IDGameScenarioPlayersDescriptionFinishedResult +
<%= row.game_id %> -<%= row.title_name %> -<%= row.scenario %> -<%- row.options %> -<%- row.player_names %> -<%= row.description %> -<%= row.mtime %> -<%= row.result %> -<%_ - if (row.is_shared) { - %>View<% - } else { - %>View<% - } -_%> -<%_ }); _%> +<%= row.game_id %> +<%= row.title_name %> +<%= row.scenario %> +<%- row.player_names %> +<%= row.description %> +<%= row.mtime %> +<%= row.result %> +<% if (row.is_shared) { %> +View +<% } else { %> +View +<% } %> +<% }); %>
-<%_ } _%> +<% } %> -<%_ if (open_games.length === 0 && active_games.length === 0 && finished_games.length === 0) { _%> +<% if (open_games.length === 0 && active_games.length === 0 && finished_games.length === 0) { %>

You don't have any current or finished games. -<%_ } _%> +<% } %> -- cgit v1.2.3