Fix: branding changes apply in real-time

Site name updates nav bar text + document title as you type.
Logo URL updates the nav brand icon. Favicon URL updates the
browser tab icon.
This commit is contained in:
you
2026-03-23 01:25:33 +00:00
parent f1cf759ebd
commit 5e81ad6c87
2 changed files with 18 additions and 1 deletions
+17
View File
@@ -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 = '<img src="' + inp.value + '" style="height:24px" onerror="this.style.display=\'none\'">'; }
else { iconEl.textContent = '📡'; }
}
}
if (inp.dataset.key === 'branding.faviconUrl') {
var link = document.querySelector('link[rel="icon"]');
if (link && inp.value) link.href = inp.value;
}
});
});
+1 -1
View File
@@ -101,6 +101,6 @@
<script src="observer-detail.js?v=1774219440" onerror="console.error('Failed to load:', this.src)"></script>
<script src="node-analytics.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
<script src="perf.js?v=1773985649" onerror="console.error('Failed to load:', this.src)"></script>
<script src="customize.js?v=1774229074" onerror="console.error('Failed to load:', this.src)"></script>
<script src="customize.js?v=1774229133" onerror="console.error('Failed to load:', this.src)"></script>
</body>
</html>