From d1318d147297161691f5048e1f2cb4e516159144 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 14 Nov 2021 17:17:49 +0100 Subject: Add 'hidden' column to titles for beta-testing games. --- views/header.ejs | 20 ++++++++++---------- views/index.ejs | 23 ++++++++++++----------- views/stats.ejs | 2 ++ 3 files changed, 24 insertions(+), 21 deletions(-) (limited to 'views') diff --git a/views/header.ejs b/views/header.ejs index 2628f8d..66f0f2e 100644 --- a/views/header.ejs +++ b/views/header.ejs @@ -2,9 +2,9 @@ -<% if (typeof refresh !== 'undefined' && refresh > 0) { _%> +<% if (typeof refresh !== 'undefined' && refresh > 0) { -%> -<% } _%> +<% } -%> <%= title %> @@ -16,21 +16,21 @@

<%= title %>

-<%_ if (typeof flash !== 'undefined' && flash.length > 0) { _%> +<% if (typeof flash !== 'undefined' && flash.length > 0) { -%>

<%= flash %>

-<%_ } _%> +<% } -%> diff --git a/views/index.ejs b/views/index.ejs index 0b3180f..1f23381 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -1,6 +1,6 @@ -<%- include('header', { title: "Rally the Troops!" }) %> +<%- include('header', { title: "Rally the Troops!" }) _%> @@ -13,15 +13,16 @@ players. Registration and use is free, and there are no ads.
- - - - -
- -
- - +<% + for (let t in titles) { + let title = titles[t]; + if (!title.hidden) { +_%> + +<% + } + } +_%>

diff --git a/views/stats.ejs b/views/stats.ejs index 9e07aaf..95b52d2 100644 --- a/views/stats.ejs +++ b/views/stats.ejs @@ -15,6 +15,8 @@ return info ? info.count : 0; } for (let title_id in title_name_map) { + if (title_name_map[title_id].hidden) + continue; let scenarios = title_rule_map[title_id].scenarios; let roles = title_role_map[title_id].concat(['Draw']); %><%= title_name_map[title_id].title_name %><% -- cgit v1.2.3