From ed2c393def063799a870e77ce9cd9f5cf1ef21b7 Mon Sep 17 00:00:00 2001 From: Til Schmitter Date: Mon, 20 Apr 2026 21:24:14 +0200 Subject: [PATCH] accent color override --- copyparty/web/browser.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 4be58dc0..b9b6aa65 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -218,6 +218,7 @@ if (1) "cl_opts": "general", "cl_hfsz": "filesize", "cl_themes": "theme", + "cl_accent": "accent color (default: #fc0)$Nsupports any css color, like rgba(255, 210, 0, 1)", "cl_langs": "language", "cl_ziptype": "folder download", "cl_uopts": "upload", @@ -1180,7 +1181,9 @@ ebi('op_cfg').innerHTML = ( '\n' + '
\n' + '

🎨 ' + L.cl_themes + '

\n' + - '
\n' + + '
' + + ' ' + + ' ' + '
\n' + '
\n' + '
\n' + @@ -1271,6 +1274,20 @@ ebi('op_cfg').innerHTML = ( } })(); +// accent color +ebi('accent').oninput = function () { + if(this.value == accent) + return; + accent = this.value; + swrite('accent', accent); + var a = accent || '#fc0'; + console.log('accent color set to: ' + a); + document.documentElement.style.setProperty('--a', a); +} +var accent = ebi('accent').value = sread('accent') || ''; +if(accent) + document.documentElement.style.setProperty('--a', accent); + // navpane ebi('tree').innerHTML = ( '
\n' +