use tcolor as default accent

This commit is contained in:
Til Schmitter 2026-06-20 18:39:37 +02:00
parent cf650af42e
commit 04151dc7c9
2 changed files with 3 additions and 0 deletions

View file

@ -296,6 +296,7 @@
CGV = {{ cgv|tojson }},
TS = "{{ ts }}",
dtheme = "{{ dtheme }}",
tcolor = "#{{ tcolor }}"
lang = "{{ lang }}",
dfavico = "{{ favico }}",
have_tags_idx = {{ have_tags_idx }},

View file

@ -1517,6 +1517,8 @@ ebi('accent').oninput = ebi('accent_picker').oninput = function () {
}, 100);
}
var accent = sread('accent');
if(!accent || accent.length <= 3)
accent = window.tcolor;
if(accent && accent.length > 3){
console.log('read accent color from settings: ' + accent);
document.documentElement.style.setProperty('--a', parseColor(accent));