Public Access
Visitor sign in kiosk: multi-site, badge printing, WWCC expiry warnings, admin accounts with 2FA
This commit is contained in:
+6
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user