From 21f2cda2ee806a6b37ebe9fa250c92abf6ff0795 Mon Sep 17 00:00:00 2001 From: William Mantly Date: Thu, 16 Jul 2026 17:26:01 -0400 Subject: [PATCH] White-label: title/logo now driven by conf (closes #6) conf.name was already plumbed into routes/index.js's values object, but never actually rendered anywhere -- , the navbar brand, and the favicon were all still hardcoded "SSO - Theta 42"/"SSO Manager". Now render <%- name %>/<%- logo %> in top.ejs; new conf.logo key (default: the existing theta42.svg) drives the navbar image and favicon. Also fixes a pre-existing broken favicon: top.ejs referenced /static/favicon.svg, which was never actually served from public/ -- only public/img/theta42.svg existed. The favicon now uses that same file via conf.logo instead of a nonexistent path. Footer copyright/logo/GitHub links are left as-is (open-source attribution, not deployment branding). --- nodejs/conf/base.js | 1 + nodejs/routes/docs.js | 1 + nodejs/routes/index.js | 1 + nodejs/views/top.ejs | 6 +++--- secrets.js.example | 1 + 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/nodejs/conf/base.js b/nodejs/conf/base.js index 2644cd8..17949a9 100644 --- a/nodejs/conf/base.js +++ b/nodejs/conf/base.js @@ -9,6 +9,7 @@ // `app_*` env vars — never commit them here. module.exports = { name: "SSO Manager", // displayed in the UI and outbound email + logo: "/static/img/theta42.svg", // shown in the nav/footer; point at your own file under public/ (or an absolute URL) to white-label userModel: 'ldap', // pam, redis, ldap redis: { prefix: 'sso_manager_' diff --git a/nodejs/routes/docs.js b/nodejs/routes/docs.js index 67d5d96..2c67733 100644 --- a/nodejs/routes/docs.js +++ b/nodejs/routes/docs.js @@ -12,6 +12,7 @@ const values = { title: conf.environment !== 'production' ? `dev` : '', titleIcon: conf.environment !== 'production' ? `<i class="fa-brands fa-dev"></i>` : '', name: conf.name, + logo: conf.logo, ...buildInfo, }; diff --git a/nodejs/routes/index.js b/nodejs/routes/index.js index 3bd5393..d389511 100755 --- a/nodejs/routes/index.js +++ b/nodejs/routes/index.js @@ -14,6 +14,7 @@ const values ={ title: conf.environment !== 'production' ? `dev` : '', titleIcon: conf.environment !== 'production' ? `<i class="fa-brands fa-dev"></i>` : '', name: conf.name, + logo: conf.logo, ...buildInfo, } diff --git a/nodejs/views/top.ejs b/nodejs/views/top.ejs index eb7e7dd..d0faa08 100755 --- a/nodejs/views/top.ejs +++ b/nodejs/views/top.ejs @@ -3,9 +3,9 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> - <title>SSO - Theta 42 <%- title %> + <%- name %> <%- title %> - + @@ -28,7 +28,7 @@