From 35a8c37922193317b3f6397562c762f9a9169b91 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 12 Jul 2020 18:22:13 +0900 Subject: [PATCH] fix(client): Fix theme color --- src/client/themes/_dark.json5 | 1 + src/client/themes/_light.json5 | 1 + src/server/web/views/base.pug | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/themes/_dark.json5 b/src/client/themes/_dark.json5 index 8d7a345fd..09c1b888f 100644 --- a/src/client/themes/_dark.json5 +++ b/src/client/themes/_dark.json5 @@ -57,6 +57,7 @@ badge: '#31b1ce', messageBg: ':lighten<5<@bg', deckColumnBorder: ':lighten<10<@panel', + htmlThemeColor: '@bg', X1: ':alpha<0<@bg', X2: ':darken<2<@panel', X3: 'rgba(255, 255, 255, 0.05)', diff --git a/src/client/themes/_light.json5 b/src/client/themes/_light.json5 index 4e499e178..0d5071a68 100644 --- a/src/client/themes/_light.json5 +++ b/src/client/themes/_light.json5 @@ -57,6 +57,7 @@ badge: '#31b1ce', messageBg: '@panel', deckColumnBorder: ':darken<20<@panel', + htmlThemeColor: '@bg', X1: ':alpha<0<@bg', X2: ':darken<2<@panel', X3: 'rgba(0, 0, 0, 0.05)', diff --git a/src/server/web/views/base.pug b/src/server/web/views/base.pug index 3a81df78b..b0c741e4c 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 === 'html') { + if (k === 'htmlThemeColor') { for (const tag of document.head.children) { if (tag.tagName === 'META' && tag.getAttribute('name') === 'theme-color') { tag.setAttribute('content', v);