From a1fe768c6d40c7c885db1c9843c61527cbe583e3 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 20 Nov 2021 19:47:08 +0100 Subject: Rewrite view templates to use Pug engine. --- views/profile.ejs | 102 ------------------------------------------------------ 1 file changed, 102 deletions(-) delete mode 100644 views/profile.ejs (limited to 'views/profile.ejs') diff --git a/views/profile.ejs b/views/profile.ejs deleted file mode 100644 index a4a23fc..0000000 --- a/views/profile.ejs +++ /dev/null @@ -1,102 +0,0 @@ -<%- include('header', { title: "Rally the Troops!", refresh: (active_games.length > 0 ? 300 : 0) }) -%> - -

-Welcome, <%= user.name %>! -

-Your mail address is <%= user.mail %>. - -
- -

» -<% if (user.notify) { %> -Disable mail notifications -<% } else { %> -Enable mail notifications -<% } %> -
» -Change -password, -mail address, -name, -or profile text. -
» -Chat log -
» -Logout - -<% if (open_games.length > 0) { %> -

Open Games

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

Active Games

- - - -<% active_games.forEach((row) => { %> - -
IDGameScenarioPlayersDescriptionChangedTurn -
<%= 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) { %> -

Finished Games

- - - -<% finished_games.forEach((row) => { %> - -
IDGameScenarioPlayersDescriptionFinishedResult -
<%= 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) { %> -

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