summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2020-02-17 06:37:39 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2020-02-17 06:37:39 +0900
commit15839a739983c78c13159fcbf95c9ed87b43a105 (patch)
tree3ee197aee028c52af7d03be3a02fd9e0d0817bc8 /src
parentClean up (diff)
downloadmisskey-15839a739983c78c13159fcbf95c9ed87b43a105.tar.gz
misskey-15839a739983c78c13159fcbf95c9ed87b43a105.tar.bz2
misskey-15839a739983c78c13159fcbf95c9ed87b43a105.zip
:art:
Diffstat (limited to 'src')
-rw-r--r--src/client/theme.ts2
-rw-r--r--src/client/themes/_dark.json51
-rw-r--r--src/client/themes/_light.json51
-rw-r--r--src/client/themes/halloween.json51
-rw-r--r--src/server/web/views/base.pug2
5 files changed, 5 insertions, 2 deletions
diff --git a/src/client/theme.ts b/src/client/theme.ts
index c446528f06..576096cf70 100644
--- a/src/client/theme.ts
+++ b/src/client/theme.ts
@@ -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;
}
}
diff --git a/src/client/themes/_dark.json5 b/src/client/themes/_dark.json5
index af5fc3b8da..4acea0a4b2 100644
--- a/src/client/themes/_dark.json5
+++ b/src/client/themes/_dark.json5
@@ -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)',
diff --git a/src/client/themes/_light.json5 b/src/client/themes/_light.json5
index 8c67bc402d..b891cc5e69 100644
--- a/src/client/themes/_light.json5
+++ b/src/client/themes/_light.json5
@@ -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)',
diff --git a/src/client/themes/halloween.json5 b/src/client/themes/halloween.json5
index 1394c793ed..7cabf01d1e 100644
--- a/src/client/themes/halloween.json5
+++ b/src/client/themes/halloween.json5
@@ -12,6 +12,7 @@
panel: '#1f1d30',
bg: '#0f0e17',
fg: '#b1bee3',
+ html: '@accent',
renote: '@accent',
},
}
diff --git a/src/server/web/views/base.pug b/src/server/web/views/base.pug
index 79ad4c5279..e6751ecca2 100644
--- a/src/server/web/views/base.pug
+++ b/src/server/web/views/base.pug
@@ -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);