From 1b71de1e0b8017bc17ef9fc678a9b465bed1dcda Mon Sep 17 00:00:00 2001 From: Shengyu Zhang Date: Sat, 27 Jan 2024 23:41:57 +0800 Subject: [PATCH] [conf] Use sphinx_tippy --- _static/tippy-custom.css | 7 +++++++ conf.py | 8 ++++++++ 2 files changed, 15 insertions(+) create mode 100644 _static/tippy-custom.css diff --git a/_static/tippy-custom.css b/_static/tippy-custom.css new file mode 100644 index 000000000..413c496ee --- /dev/null +++ b/_static/tippy-custom.css @@ -0,0 +1,7 @@ +/* https://sphinx-tippy.readthedocs.io/en/latest/ */ + +.tippy-box { + background-color:var(--pst-color-surface); + color:var(--pst-color-text-base); + border: 1px solid var(--pst-color-border); +} diff --git a/conf.py b/conf.py index f8a32e8ce..cda44a1ca 100644 --- a/conf.py +++ b/conf.py @@ -544,3 +544,11 @@ def url(self) -> str: if D is Deployment.Local: # Speed up local incremental HTML build (may cause document inconsistencies). extensions.append('sphinxnotes.fasthtml') + +extensions.append('sphinx_tippy') +tippy_rtd_urls = [ + 'https://www.sphinx-doc.org/en/master/', +] +tippy_enable_wikitips = False +tippy_enable_doitips = False +html_css_files.append('tippy-custom.css')