Update language template

This commit is contained in:
Kujiu 2020-06-03 13:18:26 +02:00
parent 3e385cd16c
commit cf5b22e927
Signed by: kujiu
GPG key ID: ABBB2CAC6855599F
4 changed files with 9 additions and 4 deletions

View file

@ -2,6 +2,11 @@
Changes Changes
======= =======
1.0.6 (*2020-06-03*)
====================
- Fix error in language template...
1.0.5 (*2020-06-03*) 1.0.5 (*2020-06-03*)
==================== ====================

View file

@ -27,7 +27,7 @@ with open("README.rst", "r") as fh:
setup( setup(
name="sphinx_nervproject_theme", name="sphinx_nervproject_theme",
version="1.0.5", version="1.0.6",
url="https://procrastinator.nerv-project.eu/nerv-project/communication/sphinx_nervproject_theme", url="https://procrastinator.nerv-project.eu/nerv-project/communication/sphinx_nervproject_theme",
license="EUPL 1.2", license="EUPL 1.2",
author="Kujiu", author="Kujiu",

View file

@ -5,7 +5,7 @@ from sphinx.environment.collectors import EnvironmentCollector
from sphinx import addnodes from sphinx import addnodes
from sphinx.util.osutil import relative_uri from sphinx.util.osutil import relative_uri
__version__ = (1, 0, 5) __version__ = (1, 0, 6)
class SimpleTocTreeCollector(EnvironmentCollector): class SimpleTocTreeCollector(EnvironmentCollector):

View file

@ -46,18 +46,18 @@
{% endif %} {% endif %}
</dd></dl></li> </dd></dl></li>
{% if post.language %}
<li id="language"><dl class="navdl"> <li id="language"><dl class="navdl">
<dt>{{ gettext('Language') }}</dt> <dt>{{ gettext('Language') }}</dt>
<dd> <dd>
{% if post.language %}
<i class="fa-fw fa fa-language"></i> <i class="fa-fw fa fa-language"></i>
{% for coll in post.language %} {% for coll in post.language %}
{% if coll|length %} {% if coll|length %}
<a href="{{ pathto(coll.docname) }}">{{ coll }}</a>{% if loop.index < post.language|length %},{% endif %} <a href="{{ pathto(coll.docname) }}">{{ coll }}</a>{% if loop.index < post.language|length %},{% endif %}
{% else %}{{ coll }}{% if loop.index < post.language|length %},{% endif %}{% endif %} {% else %}{{ coll }}{% if loop.index < post.language|length %},{% endif %}{% endif %}
{% endfor %} {% endfor %}
{% endif %}
</dd></dl></li> </dd></dl></li>
{% endif %}
<li id="category"><dl class="navdl"> <li id="category"><dl class="navdl">
<dt> {{ gettext('Category') }}</dt> <dt> {{ gettext('Category') }}</dt>