Skip to content

Commit a359d40

Browse files
Theme option flyout to enable/disable theme's flyout (#1580)
* Theme option `flyout` to enable/disable theme's flyout Add a theme option to enable/disable the theme's flyout integrated at the bottom left into the navigation bar. Closes #1579 * Use `flyout_display` with `hidden` and `attached` as options * Make `hidden` as `flyout_display` * Update docs/configuring.rst Co-authored-by: Eric Holscher <[email protected]> --------- Co-authored-by: Eric Holscher <[email protected]>
1 parent cf898d3 commit a359d40

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

docs/configuring.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ For example:
2121
'style_external_links': False,
2222
'vcs_pageview_mode': '',
2323
'style_nav_header_background': 'white',
24+
'flyout_display': 'hidden',
2425
# Toc options
2526
'collapse_navigation': True,
2627
'sticky_navigation': True,
@@ -174,6 +175,16 @@ Miscellaneous options
174175
:type: string
175176
:default: ``#2980B9``
176177

178+
.. confval:: flyout_display
179+
180+
Specify how to display the flyout (language and version selector).
181+
This can be either ``attached`` or ``hidden``.
182+
``attached`` means that it will show the flyout in the bottom of the sidebar.
183+
You will need to disable the default `Read the Docs flyout <https://docs.readthedocs.io/en/stable/flyout-menu.html>`_ in order to not have 2 flyouts showing.
184+
185+
:type: str
186+
:default: ``hidden``
187+
177188

178189
File-wide metadata
179190
==================

sphinx_rtd_theme/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
{%- endfor %}
6868
<script src="{{ pathto('_static/js/theme.js', 1) }}"></script>
6969

70-
{%- if READTHEDOCS %}
70+
{%- if READTHEDOCS and theme_flyout_display != "hidden" %}
7171
<script src="{{ pathto('_static/js/versions.js', 1) }}"></script>
7272
{%- endif %}
7373

sphinx_rtd_theme/theme.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ prev_next_buttons_location = bottom
1818
style_external_links = False
1919
style_nav_header_background =
2020
vcs_pageview_mode =
21+
flyout_display = hidden

0 commit comments

Comments
 (0)