From f87c8b9cba9141f02e5aa8429e3d019bbc0d834e Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Wed, 15 Oct 2025 05:27:14 +0200 Subject: [PATCH] docs: introduce custom version selector in api.html Fixes: #27277 Signed-off-by: Martin Fischer --- docs/source/_static/api.html | 55 ++++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 6 deletions(-) diff --git a/docs/source/_static/api.html b/docs/source/_static/api.html index 7819ecf1e6..87a5aa4521 100644 --- a/docs/source/_static/api.html +++ b/docs/source/_static/api.html @@ -15,24 +15,67 @@ margin: 0; padding: 0; } + /* + * ReadTheDocs injects its version selector which is confusing on + * this page since it doesn't affect the API version. So we hide it. + */ + readthedocs-flyout { + display: none; + } + /* Our own version selector. */ + #versionSelect { + position: fixed; + /* + * Like the ReadTheDocs selector we put it in the bottom-right corner. + * When the browser is narrow ReDoc puts its menu button in the same corner, + * the position here is chosen not to overlap with that. + */ + bottom: 14px; + right: 14px; + z-index: 99; + } +
-