From d244c624d7e96ed5d53cab5940928ece244ded01 Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Wed, 16 Aug 2023 09:44:32 +0200 Subject: [PATCH] feat: add dark mode toggle Signed-off-by: Richard Steinmetz --- conf.py | 5 ++++- requirements.txt | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/conf.py b/conf.py index 8759caefb..fffcde4f1 100644 --- a/conf.py +++ b/conf.py @@ -8,7 +8,7 @@ dir_path = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, os.path.abspath(dir_path + '/_ext')) now = datetime.datetime.now() -extensions = ['sphinx_rtd_theme'] +extensions = ['sphinx_rtd_theme', 'sphinx_rtd_dark_mode'] # General information about the project. copyright = str(now.year) + ' Nextcloud GmbH' @@ -70,3 +70,6 @@ html_context = { edit_on_github_project = 'nextcloud/documentation' edit_on_github_branch = 'master' + +# user starts in light mode +default_dark_mode = False diff --git a/requirements.txt b/requirements.txt index 18460e7a5..c1224c72b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,6 +19,7 @@ smartypants==2.0.1 snowballstemmer==2.2.0 Sphinx==4.5.0 sphinx-rtd-theme==1.2.2 +sphinx-rtd-dark-mode==1.2.4 sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.1