mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
Make location of buttons configurable
Add the `prev_next_buttons_location` variable which understand `top`, `bottom`, `both`.Any other value will not display the next and previous buttons. Not setting the value leave it to `bottom` by default.
This commit is contained in:
parent
42e4fc0bbb
commit
01707b94f5
@ -102,6 +102,9 @@ v0.1.10-alpha
|
||||
* Removes Sphinx dependency
|
||||
* Fixes hamburger on mobile display
|
||||
* Adds a ``body_begin`` block to the template
|
||||
* Add ``prev_next_buttons_location`` which can take the value ``bottom``,
|
||||
``top``, ``both`` , ``None`` and will display the "Next" and "Previous"
|
||||
buttons accordingly
|
||||
|
||||
v0.1.9
|
||||
------
|
||||
|
@ -57,6 +57,7 @@
|
||||
{% endblock %}
|
||||
</ul>
|
||||
|
||||
{% if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
|
||||
<div class="rst-breadcrumbs-buttons" role="navigation" aria-label="breadcrumb navigation">
|
||||
{% if next %}
|
||||
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
@ -65,5 +66,6 @@
|
||||
<a href="{{ prev.link|e }}" class="btn btn-neutral" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<hr/>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<footer>
|
||||
{% if next or prev %}
|
||||
{% if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
{% if next %}
|
||||
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
@ -10,3 +10,4 @@ logo_only =
|
||||
collapse_navigation = False
|
||||
display_version = True
|
||||
navigation_depth = 4
|
||||
prev_next_buttons_location = bottom
|
||||
|
Loading…
Reference in New Issue
Block a user