Don't show banner on stable (#4976)

This commit is contained in:
Jack Gerrits 2025-01-09 18:03:56 -05:00 committed by GitHub
parent 6abc70044a
commit 6bc285ce39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 2 deletions

View File

@ -0,0 +1,11 @@
var version = DOCUMENTATION_OPTIONS.VERSION;
if (version === "stable") {
var styles = `
s#bd-header-version-warning {
display: none;
}
`
var styleSheet = document.createElement("style")
styleSheet.textContent = styles
document.head.appendChild(styleSheet)
}

View File

@ -0,0 +1 @@
<script src="_static/banner-override.js"></script>

View File

@ -121,7 +121,7 @@ html_theme_options = {
"footer_start": ["copyright"],
"footer_center": ["footer-middle-links"],
"footer_end": ["theme-version"],
"footer_end": ["theme-version", "version-banner-override"],
"pygments_light_style": "xcode",
"pygments_dark_style": "monokai",
"navbar_start": ["navbar-logo", "version-switcher"],
@ -135,7 +135,7 @@ html_theme_options = {
]
}
html_js_files = ["custom-icon.js"]
html_js_files = ["custom-icon.js", "banner-override.js"]
html_sidebars = {
"packages/index": [],
"user-guide/core-user-guide/**": ["sidebar-nav-bs-core"],