From a7b926e48eb1a34a72c8123b44438b3d8afef224 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Mon, 8 Jun 2020 12:46:18 +0200 Subject: 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. --- templates/index.html | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'templates/index.html') 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.content | safe }}
-
- This page is also available in: - {% for l in section.translations %} - {% if l.lang != lang %} - {{ trans(key=l.lang) }} - {% endif %} - {% endfor %} -
{% for sub in section.subsections %} -- cgit v1.2.3