From ce439c92653b62e673b23c960217f3f5e829adea Mon Sep 17 00:00:00 2001 From: Xander Date: Wed, 9 Aug 2023 15:17:44 +0200 Subject: [PATCH] add dark mode --- config/others/cloud.yml | 12 ++++++++++++ config/others/landing_page.yml | 12 ++++++++++++ config/others/linux-tutorial.yml | 12 ++++++++++++ config/templates/hpc.template | 12 ++++++++++++ 4 files changed, 48 insertions(+) diff --git a/config/others/cloud.yml b/config/others/cloud.yml index 65a96299347..a455f2e641c 100644 --- a/config/others/cloud.yml +++ b/config/others/cloud.yml @@ -67,6 +67,18 @@ theme: - search.highlight - search.share - content.code.copy + palette: + - media: "(prefers-color-scheme: light)" + scheme: default + toggle: + icon: material/brightness-7 + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: blue + toggle: + icon: material/brightness-4 + name: Switch to light mode extra: build_dir: build diff --git a/config/others/landing_page.yml b/config/others/landing_page.yml index 98679d0493a..aceb36e5500 100644 --- a/config/others/landing_page.yml +++ b/config/others/landing_page.yml @@ -32,6 +32,18 @@ theme: features: - search.suggest - search.highlight + palette: + - media: "(prefers-color-scheme: light)" + scheme: default + toggle: + icon: material/brightness-7 + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: blue + toggle: + icon: material/brightness-4 + name: Switch to light mode extra: diff --git a/config/others/linux-tutorial.yml b/config/others/linux-tutorial.yml index 5780e8f1947..9b4b3f7196b 100644 --- a/config/others/linux-tutorial.yml +++ b/config/others/linux-tutorial.yml @@ -67,6 +67,18 @@ theme: - search.highlight - search.share - content.code.copy + palette: + - media: "(prefers-color-scheme: light)" + scheme: default + toggle: + icon: material/brightness-7 + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: blue + toggle: + icon: material/brightness-4 + name: Switch to light mode extra: build_dir: build diff --git a/config/templates/hpc.template b/config/templates/hpc.template index 0ee48d46ddc..09821a46252 100644 --- a/config/templates/hpc.template +++ b/config/templates/hpc.template @@ -119,6 +119,18 @@ theme: - search.highlight - search.share - content.code.copy + palette: + - media: "(prefers-color-scheme: light)" + scheme: default + toggle: + icon: material/brightness-7 + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: blue + toggle: + icon: material/brightness-4 + name: Switch to light mode extra: OS: {{ os }}