v1.8.6: branding — colors apply instantly, logo upload with size control, fix tracking width
This commit is contained in:
+8
-2
@@ -371,8 +371,14 @@ let currentUser = null;
|
||||
|
||||
// ── Branding ──────────────────────────────────────────────────────────────────
|
||||
fetch('/branding').then(r=>r.json()).then(b=>{
|
||||
if(b.site_name){document.title=b.site_name;document.getElementById('brand-name').textContent=b.site_name;}
|
||||
if(b.site_subtitle) document.getElementById('brand-sub').textContent=b.site_subtitle;
|
||||
if(b.site_name){document.title=b.site_name;const bn=document.getElementById('brand-name');if(bn)bn.textContent=b.site_name;}
|
||||
if(b.site_subtitle){const bs=document.getElementById('brand-sub');if(bs)bs.textContent=b.site_subtitle;}
|
||||
if(b.primary_color) document.documentElement.style.setProperty('--primary', b.primary_color);
|
||||
if(b.secondary_color) document.documentElement.style.setProperty('--secondary', b.secondary_color);
|
||||
if(b.logo_url){
|
||||
const logo=document.getElementById('brand-logo');
|
||||
if(logo){logo.src=b.logo_url;logo.style.height=(b.logo_size||'40')+'px';logo.classList.remove('hidden');}
|
||||
}
|
||||
}).catch(()=>{});
|
||||
|
||||
// ── Counter animation ─────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user