Update web/templates/settings/home.html
This commit is contained in:
parent
d154dc12d3
commit
bbbac0e3e3
@ -223,8 +223,9 @@
|
||||
// Helpers
|
||||
function getCookie(name){ const m=document.cookie.match("(^|;)\\s*"+name+"\\s*=\\s*([^;]+)"); return m?m.pop():""; }
|
||||
function setTheme(name){
|
||||
var v='{{ APP_VERSION }}';
|
||||
var link=document.getElementById('theme-css');
|
||||
if(link) link.href='{% static "themes/" %}'+name+'.css';
|
||||
if(link) link.href='{% static "themes/" %}'+name+'.css?v='+v; // << cache-busted preview
|
||||
document.documentElement.setAttribute('data-theme',name);
|
||||
try{ localStorage.setItem('theme',name); }catch(e){}
|
||||
if(name==='classic'){ document.body.classList.add('themed-bg'); } else { document.body.classList.remove('themed-bg'); }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user