From fd714859604a9486e36a9bc1c17ca8e0c6d2de24 Mon Sep 17 00:00:00 2001 From: William Mantly Date: Thu, 16 Jul 2026 17:35:49 -0400 Subject: [PATCH] White-label: title/logo now driven by conf (closes #45) , the navbar brand text, and the logo were all hardcoded "Proxy - Theta 42"/"Dynamic Proxy". New conf.name/conf.logo keys (defaults matching current text/asset) thread through the existing values object pattern in routes/render.js and routes/docs.js, and top.ejs now renders <%- name %>/<%- logo %> for the title and a new navbar logo image. Footer (copyright, theta42.com link, GitHub/license links) and the existing favicon.svg are left as-is -- open-source attribution and a distinct, already-working icon asset, not deployment branding. --- nodejs/conf/base.js | 2 ++ nodejs/routes/docs.js | 2 ++ nodejs/routes/render.js | 2 ++ nodejs/views/top.ejs | 4 ++-- secrets.js.example | 3 +++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/nodejs/conf/base.js b/nodejs/conf/base.js index 8e3df65..cebbce7 100644 --- a/nodejs/conf/base.js +++ b/nodejs/conf/base.js @@ -2,6 +2,8 @@ // Using https://github.com/simpleworkjs/conf to handle configuration module.exports = { + name: "Dynamic Proxy", // displayed in the UI + logo: "/static/img/theta42.svg", // shown in the nav; point at your own file under public/ (or an absolute URL) to white-label userModel: 'redis', // pam, redis, ldap ldap: { url: 'ldap://192.168.1.55:389', diff --git a/nodejs/routes/docs.js b/nodejs/routes/docs.js index 93d678d..fec29ad 100644 --- a/nodejs/routes/docs.js +++ b/nodejs/routes/docs.js @@ -22,6 +22,8 @@ const docsLimiter = rateLimit({ 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/render.js b/nodejs/routes/render.js index 6f592fc..a5c8746 100644 --- a/nodejs/routes/render.js +++ b/nodejs/routes/render.js @@ -9,6 +9,8 @@ const buildInfo = require('../utils/build_info'); 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 06cdcfd..75cf0dd 100755 --- a/nodejs/views/top.ejs +++ b/nodejs/views/top.ejs @@ -3,7 +3,7 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> - <title>Proxy - Theta 42 <%- title %> + <%- name %> <%- title %> @@ -28,7 +28,7 @@