Add a footer, move GitHub link out of the nav (#130)
proxy had no page footer at all — no copyright, no license link, no build/version info — unlike sso-manager-node, which already had one (now cleaned up in a matching change there). Bring the two in line: - Added a footer to bottom.ejs: theta42 logo/link, "© <year> theta42" with an MIT License link, a GitHub link, and build version/hash. - Moved the GitHub icon link out of the top nav (where it competed with actual navigation items) and into the new footer. - Added nodejs/utils/build_info.js (buildVersion/buildHash/buildYear, read once from package.json + git) and wired it into routes/render.js so every page has the values the footer needs. Mirrors the same helper added to sso-manager-node in the matching cleanup there. - Copied the theta42.svg logo into nodejs/public/img/ (previously only present in sso-manager-node) so both apps' footers render identically. Verified by rendering top+bottom with the real ejs package: no template errors, GitHub link present exactly once (in the footer, not the nav), logo and MIT License link present. npm test: 192/192 pass (unaffected — view-only + a new leaf utility module).
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
const { execSync } = require('child_process');
|
||||
const { version: buildVersion } = require('../package.json');
|
||||
|
||||
let buildHash = 'unknown';
|
||||
try {
|
||||
buildHash = execSync('git rev-parse --short HEAD', { cwd: __dirname }).toString().trim();
|
||||
} catch (_) {}
|
||||
|
||||
module.exports = {
|
||||
buildVersion,
|
||||
buildHash,
|
||||
buildYear: new Date().getFullYear(),
|
||||
};
|
||||
Reference in New Issue
Block a user