diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2020-06-08 12:46:18 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2020-06-08 12:49:42 +0200 |
commit | a7b926e48eb1a34a72c8123b44438b3d8afef224 (patch) | |
tree | 7eb689425ad51a32105aebdc4c6d34dab5f07150 /templates/index.html | |
parent | 90a04beaed62c8c93140800eb11c7f4153d06b62 (diff) | |
download | rabalderz-a7b926e48eb1a34a72c8123b44438b3d8afef224.tar.gz rabalderz-a7b926e48eb1a34a72c8123b44438b3d8afef224.tar.bz2 rabalderz-a7b926e48eb1a34a72c8123b44438b3d8afef224.zip |
Add translation links in site header.
Add translation links in the site header for sections and index.
This also moved the header back into the base template, as it seems zola
is not able to handle blocks defined in included templates. At least
that's what it looked like. Didn't test much.
Diffstat (limited to 'templates/index.html')
-rw-r--r-- | templates/index.html | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/templates/index.html b/templates/index.html index 48857c4..0296444 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,17 +1,13 @@ {% extends "base.html" %} -{% block content %} +{% block language %} +{% set translations = section.translations %} +{% include "translation-links.html" %} +{% endblock language %} +{% block content %} <section id="home-blurb"> {{ section.content | safe }} </section> -<section id="translations"> - This page is also available in: - {% for l in section.translations %} - {% if l.lang != lang %} - <a href="{{ l.permalink | safe }}">{{ trans(key=l.lang) }}</a> - {% endif %} - {% endfor %} -</section> <section class="subsections"> {% for sub in section.subsections %} |