Closed hagenw closed 1 year ago
The "relbars" can already be activated and deactivated individually using the relbar1
and relbar2
blocks, as shown in https://insipid-sphinx-theme.readthedocs.io/en/0.4.1/customization.html#custom-templates
This affects all pages, but you might be able to get per-page settings with some additional Jinja2 magic?
Thanks, I overlooked this. It is indeed straightforward, the _templates/layout.html
file just needs to contain:
{% extends "!layout.html" %}
{% block relbar1 %}{% endblock %}
to disable the top next /prev buttons.
Indeed, the breadcrumbs
branch is an example for that: https://github.com/mgeier/insipid-sphinx-theme/compare/breadcrumbs^...breadcrumbs.
The current solution seems fine to me. You can close this issue if you like as I don't think it is necessary to provide the functionality of automatically adjusting the visibility of the top and/or bottom prev/next buttons.
If a documentation contains a lot of short pages it looks a little bit weird that we have prev/next buttons at the top and the bottom, e.g.
One solution might be to automatically adjust if we present the buttons at the top depending on the page length.
An easier solution would be to provide different CSS classes for them so a user could write custom CSS code to hide one occurrences of the next/prev buttons. At the moment this is not possible as they are both added to the page with the
relbar
class. Maybe one could add an additionaltop
andbottom
class to them, e.g.