diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 15e9b98fe..1c1795e8f 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -17,6 +17,7 @@ {% if theme_touch_icon %} {% endif %} + {{ super() }} {% endblock %} diff --git a/docs/_templates/versionselector.html b/docs/_templates/versionselector.html new file mode 100644 index 000000000..df15c77f5 --- /dev/null +++ b/docs/_templates/versionselector.html @@ -0,0 +1,29 @@ +
+ diff --git a/docs/borg_theme/css/borg.css b/docs/borg_theme/css/borg.css index 66712b418..b96722f42 100644 --- a/docs/borg_theme/css/borg.css +++ b/docs/borg_theme/css/borg.css @@ -178,3 +178,45 @@ cite { #common-options .option { white-space: nowrap; } +/* Remove the right-column max-width cap so content fills the full available width. */ +#right-column { + max-width: none; +} +/* Hide the default RTD flyout since we show the version selector in the sidebar. */ +readthedocs-flyout { + display: none !important; +} +/* Version selector in the sidebar. */ +.version-selector { + padding: 0 22px; + margin: 7px 0 7px 0; + font-size: 14px; +} +.version-selector label { + display: block; + margin-bottom: 4px; + color: #000; +} +.version-selector select { + width: 100%; + padding: 4px; + background-color: #fafafa; + color: #000; + border: 1px solid #ccc; + border-radius: 3px; +} +.version-selector::after { + content: ''; + display: block; + border-top: 1px solid #ccc; + margin: 7px 0 0 0; +} +/* Reduce top and bottom margin of searchbox block to 7px to match separator spacing. */ +.sidebar-block:has(#main-search) { + margin-top: 7px; + margin-bottom: 7px; +} +/* Reduce the separator margin below the search block to 7px. */ +.sphinxsidebar > .sidebar-block:has(#main-search):after { + margin: 7px 22px 0 22px; +} diff --git a/docs/conf.py b/docs/conf.py index ccc1c552a..7388fdf92 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -156,7 +156,7 @@ html_use_smartypants = True smartquotes_action = "qe" # no D in there means "do not transform -- and ---" # Custom sidebar templates, maps document names to template names. -html_sidebars = {"**": ["logo-text.html", "searchbox.html", "globaltoc.html"]} +html_sidebars = {"**": ["logo-text.html", "versionselector.html", "searchbox.html", "globaltoc.html"]} # Additional templates that should be rendered to pages, maps page names to # template names.