diff --git a/public/customize.js b/public/customize.js index 47a83de4..ae0b35dc 100644 --- a/public/customize.js +++ b/public/customize.js @@ -520,6 +520,23 @@ if (parts.length === 2) { state[parts[0]][parts[1]] = inp.value; } + // Live DOM updates for branding + if (inp.dataset.key === 'branding.siteName') { + var brandEl = document.querySelector('.brand-text'); + if (brandEl) brandEl.textContent = inp.value; + document.title = inp.value; + } + if (inp.dataset.key === 'branding.logoUrl') { + var iconEl = document.querySelector('.brand-icon'); + if (iconEl) { + if (inp.value) { iconEl.innerHTML = ''; } + else { iconEl.textContent = '📡'; } + } + } + if (inp.dataset.key === 'branding.faviconUrl') { + var link = document.querySelector('link[rel="icon"]'); + if (link && inp.value) link.href = inp.value; + } }); }); diff --git a/public/index.html b/public/index.html index e2395c77..19b3868e 100644 --- a/public/index.html +++ b/public/index.html @@ -101,6 +101,6 @@ - +