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 -- <title>, 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).
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
// `app_*` env vars — never commit them here.
|
// `app_*` env vars — never commit them here.
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "SSO Manager", // displayed in the UI and outbound email
|
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
|
userModel: 'ldap', // pam, redis, ldap
|
||||||
redis: {
|
redis: {
|
||||||
prefix: 'sso_manager_'
|
prefix: 'sso_manager_'
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ const values = {
|
|||||||
title: conf.environment !== 'production' ? `dev` : '',
|
title: conf.environment !== 'production' ? `dev` : '',
|
||||||
titleIcon: conf.environment !== 'production' ? `<i class="fa-brands fa-dev"></i>` : '',
|
titleIcon: conf.environment !== 'production' ? `<i class="fa-brands fa-dev"></i>` : '',
|
||||||
name: conf.name,
|
name: conf.name,
|
||||||
|
logo: conf.logo,
|
||||||
...buildInfo,
|
...buildInfo,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ const values ={
|
|||||||
title: conf.environment !== 'production' ? `dev` : '',
|
title: conf.environment !== 'production' ? `dev` : '',
|
||||||
titleIcon: conf.environment !== 'production' ? `<i class="fa-brands fa-dev"></i>` : '',
|
titleIcon: conf.environment !== 'production' ? `<i class="fa-brands fa-dev"></i>` : '',
|
||||||
name: conf.name,
|
name: conf.name,
|
||||||
|
logo: conf.logo,
|
||||||
...buildInfo,
|
...buildInfo,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<title>SSO - Theta 42 <%- title %></title>
|
<title><%- name %> <%- title %></title>
|
||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
<link rel="icon" type="image/svg+xml" href="<%- logo %>">
|
||||||
<!-- CSS are placed here -->
|
<!-- CSS are placed here -->
|
||||||
<link rel="stylesheet" href="/static-modules/bootstrap/dist/css/bootstrap.min.css">
|
<link rel="stylesheet" href="/static-modules/bootstrap/dist/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="/static-modules/@fortawesome/fontawesome-free/css/all.min.css">
|
<link rel="stylesheet" href="/static-modules/@fortawesome/fontawesome-free/css/all.min.css">
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
|
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
|
||||||
<a class="navbar-brand" href="#">SSO Manager <%- titleIcon %></a>
|
<a class="navbar-brand" href="#"><img src="<%- logo %>" height="28" class="me-2" alt=""><%- name %> <%- titleIcon %></a>
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
port: 3001,
|
port: 3001,
|
||||||
name: 'SSO Manager', // shown in UI and outbound email
|
name: 'SSO Manager', // shown in UI and outbound email
|
||||||
|
logo: '/static/img/theta42.svg', // nav/favicon image; point at your own file under public/ to white-label
|
||||||
ldap: {
|
ldap: {
|
||||||
url: 'ldap://localhost', // or ldaps://host:636 for TLS
|
url: 'ldap://localhost', // or ldaps://host:636 for TLS
|
||||||
bindDN: 'cn=admin,dc=example,dc=com',
|
bindDN: 'cn=admin,dc=example,dc=com',
|
||||||
|
|||||||
Reference in New Issue
Block a user