From a7a0ebf01751e1b95980af8bb66bcc0f38f2590f Mon Sep 17 00:00:00 2001 From: Georgi Matev Date: Wed, 14 Dec 2022 09:23:22 -0800 Subject: [PATCH] Force home page to dark mode while allowing choice for other pages (#1810) ## Description Force home page to dark mode while allowing choice for other pages ## Does this PR need a docs update or release note? - [ ] :white_check_mark: Yes, it's included - [ ] :clock1: Yes, but in a later PR - [x] :no_entry: No ## Type of change - [x] :sunflower: Feature - [ ] :bug: Bugfix - [ ] :world_map: Documentation - [ ] :robot: Test - [ ] :computer: CI/Deployment - [ ] :hamster: Trivial/Minor ## Issue(s) ## Test Plan - [x] :muscle: Manual - [ ] :zap: Unit test - [ ] :green_heart: E2E --- website/docusaurus.config.js | 4 ++-- website/src/components/parts/Demo.js | 1 + website/src/css/custom.scss | 7 +++++++ website/src/pages/index.js | 21 ++++++++++++++++++++- 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index fd5605789..1a05fc499 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -145,8 +145,8 @@ const config = { }, colorMode: { defaultMode: 'dark', - disableSwitch: true, - respectPrefersColorScheme: false, + disableSwitch: false, + respectPrefersColorScheme: true, }, zoom: { diff --git a/website/src/components/parts/Demo.js b/website/src/components/parts/Demo.js index c06bbe6c6..6981a1f4e 100644 --- a/website/src/components/parts/Demo.js +++ b/website/src/components/parts/Demo.js @@ -18,6 +18,7 @@ export default function Demo() { borderLeft: "2px solid #e5e7eb", borderRight: "2px solid #e5e7eb", borderBottom: "2px solid #e5e7eb", + backgroundColor: "#121831", }} >