mirror of
https://github.com/deesiigneer/pyspapi.git
synced 2026-04-20 12:35:26 +00:00
version dropdown fix
This commit is contained in:
8
docs/_static/custom.css
vendored
8
docs/_static/custom.css
vendored
@@ -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%;
|
||||
@@ -16,4 +16,4 @@
|
||||
top: 0;
|
||||
background-color: var(--pst-color-success);
|
||||
opacity: 0.1;
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user