Let an installation look different via ENVIRONMENT_NAME and ENVIRONMENT_COLOR

Setting ENVIRONMENT_NAME (and optionally ENVIRONMENT_COLOR, a name or hex
value) gives the sidebar that colour, adds a name badge next to the title and
on the sign-in page, and prefixes the browser tab title, so a dev copy can't
be taken for production. Unset, nothing changes. The colour is validated to a
plain #rrggbb before it reaches the page's styles. A public
GET /api/environment lets the sign-in page use it too.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-13 20:59:25 +02:00
1 parent 44cc9d1cf2
commit 7e196be56d
11 files changed
+253 -3

No files matched your search

+18
View File
@@ -34,6 +34,24 @@
margin-bottom: 1.5rem;
}
/* An installation told to look different (ENVIRONMENT_NAME / ENVIRONMENT_COLOR on the server), so a dev copy can't be taken for production. */
html[data-env] .navbar-vertical {
background-color: var(--hlm-env-color) !important;
}
.env-badge {
background-color: #fff;
color: var(--hlm-env-color, #000);
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
vertical-align: middle;
}
.login-card-env {
border-top: 4px solid var(--hlm-env-color);
}
/* Sidebar submenus: a little tighter than Tabler's dropdown rows, so several open groups still fit on one screen. */
.navbar-vertical .dropdown-menu .dropdown-item {
padding-top: 0.3rem;