mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-25 06:16:42 -06: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) {
|
for (const tag of document.head.children) {
|
||||||
if (tag.tagName === 'META' && tag.getAttribute('name') === 'theme-color') {
|
if (tag.tagName === 'META' && tag.getAttribute('name') === 'theme-color') {
|
||||||
tag.setAttribute('content', props['accent']);
|
tag.setAttribute('content', props['html']);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
bg: '#000',
|
bg: '#000',
|
||||||
fg: '#c7d1d8',
|
fg: '#c7d1d8',
|
||||||
fgHighlighted: ':lighten<3<@fg',
|
fgHighlighted: ':lighten<3<@fg',
|
||||||
|
html: '@bg',
|
||||||
panel: '#111213',
|
panel: '#111213',
|
||||||
shadow: 'rgba(0, 0, 0, 0.1)',
|
shadow: 'rgba(0, 0, 0, 0.1)',
|
||||||
header: 'rgba(20, 20, 20, 0.75)',
|
header: 'rgba(20, 20, 20, 0.75)',
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
bg: '#fafafa',
|
bg: '#fafafa',
|
||||||
fg: '#5c6a73',
|
fg: '#5c6a73',
|
||||||
fgHighlighted: ':darken<3<@fg',
|
fgHighlighted: ':darken<3<@fg',
|
||||||
|
html: '@bg',
|
||||||
panel: '#fff',
|
panel: '#fff',
|
||||||
shadow: 'rgba(0, 0, 0, 0.1)',
|
shadow: 'rgba(0, 0, 0, 0.1)',
|
||||||
header: 'rgba(255, 255, 255, 0.75)',
|
header: 'rgba(255, 255, 255, 0.75)',
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
panel: '#1f1d30',
|
panel: '#1f1d30',
|
||||||
bg: '#0f0e17',
|
bg: '#0f0e17',
|
||||||
fg: '#b1bee3',
|
fg: '#b1bee3',
|
||||||
|
html: '@accent',
|
||||||
renote: '@accent',
|
renote: '@accent',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ html
|
||||||
if (theme) {
|
if (theme) {
|
||||||
for (const [k, v] of Object.entries(JSON.parse(theme))) {
|
for (const [k, v] of Object.entries(JSON.parse(theme))) {
|
||||||
document.documentElement.style.setProperty(`--${k}`, v.toString());
|
document.documentElement.style.setProperty(`--${k}`, v.toString());
|
||||||
if (k === 'accent') {
|
if (k === 'html') {
|
||||||
for (const tag of document.head.children) {
|
for (const tag of document.head.children) {
|
||||||
if (tag.tagName === 'META' && tag.getAttribute('name') === 'theme-color') {
|
if (tag.tagName === 'META' && tag.getAttribute('name') === 'theme-color') {
|
||||||
tag.setAttribute('content', v);
|
tag.setAttribute('content', v);
|
||||||
|
|
Loading…
Reference in a new issue