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 <25510+ericholscher@users.noreply.github.com>

---------

Co-authored-by: Eric Holscher <25510+ericholscher@users.noreply.github.com>
This commit is contained in:
Manuel Kaufmann
2024-08-14 12:14:42 +02:00
committed by GitHub
parent cf898d3acc
commit a359d40e28
3 changed files with 13 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ For example:
'style_external_links': False,
'vcs_pageview_mode': '',
'style_nav_header_background': 'white',
'flyout_display': 'hidden',
# Toc options
'collapse_navigation': True,
'sticky_navigation': True,
@@ -174,6 +175,16 @@ Miscellaneous options
:type: string
:default: ``#2980B9``
.. confval:: flyout_display
Specify how to display the flyout (language and version selector).
This can be either ``attached`` or ``hidden``.
``attached`` means that it will show the flyout in the bottom of the sidebar.
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.
:type: str
:default: ``hidden``
File-wide metadata
==================

View File

@@ -67,7 +67,7 @@
{%- endfor %}
<script src="{{ pathto('_static/js/theme.js', 1) }}"></script>
{%- if READTHEDOCS %}
{%- if READTHEDOCS and theme_flyout_display != "hidden" %}
<script src="{{ pathto('_static/js/versions.js', 1) }}"></script>
{%- endif %}

View File

@@ -18,3 +18,4 @@ prev_next_buttons_location = bottom
style_external_links = False
style_nav_header_background =
vcs_pageview_mode =
flyout_display = hidden