version dropdown fix

This commit is contained in:
deesiigneer
2022-08-16 00:12:04 +03:00
parent 63ee509067
commit 74a46277f8
2 changed files with 11 additions and 6 deletions

View File

@@ -1,13 +1,13 @@
/* Background of stable should be green */
#version_switcher a[data-version-name*="stable"] {
.version-switcher__container a[data-version-name*="stable"] {
position: relative;
}
#version_switcher a[data-version-name*="stable"] span {
.version-switcher__container a[data-version-name*="stable"] span {
color: var(--pst-color-success);
}
#version_switcher a[data-version-name*="stable"] span:before {
.version-switcher__container a[data-version-name*="stable"] span:before {
content: "";
width: 100%;
height: 100%;

View File

@@ -1,4 +1,5 @@
from re import search, MULTILINE
import os
project = 'pyspapi'
copyright = '2022, deesiigneer'
@@ -28,6 +29,10 @@ intersphinx_mapping = {
'python': ('https://docs.python.org/3/', None),
'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
}
version_match = os.environ.get("READTHEDOCS_VERSION")
json_url = f"https://pyspapi.readthedocs.io/ru/{version_match}/_static/switcher.json"
intersphinx_disabled_domains = ['std']
language = None
locale_dirs = ["locale/"]
@@ -67,8 +72,8 @@ html_theme_options = {
"show_toc_level": 1,
"navbar_start": ["navbar-logo", "version-switcher"],
"switcher": {
"json_url": "https://pyspapi.readthedocs.io/en/latest/_static/switcher.json",
"version_match": "latest"
"json_url": json_url,
"version_match": version_match
},
"navigation_with_keys": True,
}