mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 12:53:11 +02:00
🎨
This commit is contained in:
parent
26b3a14a63
commit
15839a7399
5 changed files with 5 additions and 2 deletions
|
@ -52,7 +52,7 @@ export function applyTheme(theme: Theme, persist = true) {
|
|||
|
||||
for (const tag of document.head.children) {
|
||||
if (tag.tagName === 'META' && tag.getAttribute('name') === 'theme-color') {
|
||||
tag.setAttribute('content', props['accent']);
|
||||
tag.setAttribute('content', props['html']);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
bg: '#000',
|
||||
fg: '#c7d1d8',
|
||||
fgHighlighted: ':lighten<3<@fg',
|
||||
html: '@bg',
|
||||
panel: '#111213',
|
||||
shadow: 'rgba(0, 0, 0, 0.1)',
|
||||
header: 'rgba(20, 20, 20, 0.75)',
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
bg: '#fafafa',
|
||||
fg: '#5c6a73',
|
||||
fgHighlighted: ':darken<3<@fg',
|
||||
html: '@bg',
|
||||
panel: '#fff',
|
||||
shadow: 'rgba(0, 0, 0, 0.1)',
|
||||
header: 'rgba(255, 255, 255, 0.75)',
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
panel: '#1f1d30',
|
||||
bg: '#0f0e17',
|
||||
fg: '#b1bee3',
|
||||
html: '@accent',
|
||||
renote: '@accent',
|
||||
},
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ html
|
|||
if (theme) {
|
||||
for (const [k, v] of Object.entries(JSON.parse(theme))) {
|
||||
document.documentElement.style.setProperty(`--${k}`, v.toString());
|
||||
if (k === 'accent') {
|
||||
if (k === 'html') {
|
||||
for (const tag of document.head.children) {
|
||||
if (tag.tagName === 'META' && tag.getAttribute('name') === 'theme-color') {
|
||||
tag.setAttribute('content', v);
|
||||
|
|
Loading…
Reference in a new issue