Visitor sign in kiosk: multi-site, badge printing, WWCC expiry warnings, admin accounts with 2FA

This commit is contained in:
2026-09-02 16:21:42 +10:00
parent 74792b2764
commit ff9f51eaf9
10 changed files with 52 additions and 13 deletions
+6 -2
View File
@@ -440,7 +440,7 @@ async function chooseSite() {
* the shades and the text colours that sit on them are derived server-side so a
* dark logo colour cannot end up with dark text on it.
*/
function applyTheme(theme, banner) {
function applyTheme(theme, banner, align = 'left') {
if (theme) {
const root = document.documentElement.style;
root.setProperty('--deep', theme.brand);
@@ -458,6 +458,10 @@ function applyTheme(theme, banner) {
}
const img = $('#banner');
const bar = $('#bar');
bar.classList.toggle('align-center', align === 'center');
bar.classList.toggle('align-left', align !== 'center');
if (banner?.url) {
img.src = banner.url;
img.style.maxHeight = `${banner.height}px`;
@@ -477,7 +481,7 @@ async function loadSiteContext() {
document.title = name;
$('#siteName').textContent = name;
$('#banner').alt = name;
applyTheme(siteConfig.theme, siteConfig.banner);
applyTheme(siteConfig.theme, siteConfig.banner, siteConfig.headerAlign);
const change = $('#change-site');
change.hidden = !siteConfig.multiSite;