docs: Relative links improvements

- replace two separate blocks for previous and next chapter on side
  bar with common 'Navigation' block;
- add link to table of contents to the block, as it's not that easy
  to find one in current layout.

Change-Id: Iabb191fa94ac9bcb061db8e90d69c87525965527
This commit is contained in:
Ivan A. Melnikov 2014-03-13 12:05:57 +04:00
parent f68a407998
commit 37ec87fdcf
2 changed files with 16 additions and 1 deletions

View File

@ -20,7 +20,7 @@ extensions = [
# execute "export SPHINX_DEBUG=1" in your terminal to disable
# Add any paths that contain templates here, relative to this directory.
# templates_path = []
templates_path = ['templates']
# The suffix of source filenames.
source_suffix = '.rst'

View File

@ -0,0 +1,15 @@
{% extends "!layout.html" %}
{% block sidebarrel %}
<h3>{{ _('Navigation')}}</h3>
<ul>
{% if pagename != "index" %}
<li><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></li>
{% endif %}
{% if next %}
<li><a href="{{ next.link|e }}" title="{{ _('next chapter') }}">{{ _('Next topic') }}: {{ next.title }}</a></li>
{% endif %}
{% if prev %}
<li><a href="{{ prev.link|e }}" title="{{ _('previous chapter') }}">{{ _('Previous topic') }}: {{ prev.title }}</a></li>
{% endif %}
</ul>
{% endblock %}