From b8a9ac1b1137b779ede86f6c63fb172a9179b382 Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Wed, 3 May 2023 21:08:50 +0200 Subject: [PATCH] DOC: Switch to sphinx_immaterial theme --- doc/conf.py | 22 ++++++++++++++++++++++ doc/requirements.txt | 1 + 2 files changed, 23 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index bbb90390..2d795e16 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -137,6 +137,28 @@ html_favicon = 'favicon.svg' html_title = project + ' version ' + release +html_theme = 'sphinx_immaterial' +extensions.append('sphinx_immaterial') +html_theme_options = { + 'palette': [ + { + 'media': '(prefers-color-scheme: light)', + 'scheme': 'default', + 'toggle': { + 'icon': 'material/toggle-switch-off-outline', + 'name': 'Switch to dark mode', + } + }, + { + 'media': '(prefers-color-scheme: dark)', + 'scheme': 'slate', + 'toggle': { + 'icon': 'material/toggle-switch', + 'name': 'Switch to light mode', + } + }, + ] +} # -- Options for LaTeX output --------------------------------------------- diff --git a/doc/requirements.txt b/doc/requirements.txt index eafc24d2..daa43ff8 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,3 +1,4 @@ +sphinx-immaterial ipykernel numpy matplotlib