From df8c12c62fe5992c00b77032226ae1285aada78f Mon Sep 17 00:00:00 2001 From: Tom Teichler <tom.teichler@teckids.org> Date: Wed, 13 May 2020 14:28:45 +0200 Subject: [PATCH] Add list of translations to pages. Closes #7 --- templates/archives.html | 2 ++ templates/page_default.html | 2 ++ templates/page_with_carousel.html | 9 +++++++++ templates/page_with_carousel_button.html | 9 +++++++++ 4 files changed, 22 insertions(+) diff --git a/templates/archives.html b/templates/archives.html index 0924007..c15aaf8 100644 --- a/templates/archives.html +++ b/templates/archives.html @@ -7,6 +7,8 @@ <h1>News</h1> {% for article in articles %} <h2><a href="{{ article.url }}">{{ article.title }}</a></h2> + {% import 'translations.html' as translations with context %} + {{ translations.translations_for(article) }} <p>{{ article.date }} · <a href="{{ article.author.url }}">{{ article.author }}</a></p> {{ article.summary }} {% endfor %} diff --git a/templates/page_default.html b/templates/page_default.html index 02fbf88..130d388 100644 --- a/templates/page_default.html +++ b/templates/page_default.html @@ -21,6 +21,8 @@ {% block content_title %} <h1>Recent News</h1> <div class='feed-text'><a href="https://teckids.edugit.io/feeds/all.atom.xml">Feed <i class='fa fa-rss'></i></a></div> + {% import 'translations.html' as translations with context %} + {{ translations.translations_for(page) }} {% endblock %} </div> </div> diff --git a/templates/page_with_carousel.html b/templates/page_with_carousel.html index 4baacdb..9cbb8e2 100644 --- a/templates/page_with_carousel.html +++ b/templates/page_with_carousel.html @@ -28,6 +28,15 @@ {% block content %} + <div class="container title"> + <div class="row clearfix"> + <div class="column full"> + {% import 'translations.html' as translations with context %} + {{ translations.translations_for(page) }} + </div> + </div> + </div> + <section class='page_content'> <div class='container'> <div class='row clearfix'> diff --git a/templates/page_with_carousel_button.html b/templates/page_with_carousel_button.html index 91412cd..ac68d74 100644 --- a/templates/page_with_carousel_button.html +++ b/templates/page_with_carousel_button.html @@ -28,6 +28,15 @@ {% block content %} + <div class="container title"> + <div class="row clearfix"> + <div class="column full"> + {% import 'translations.html' as translations with context %} + {{ translations.translations_for(page) }} + </div> + </div> + </div> + <section class='page_content'> <div class='container'> <div class='row clearfix'> -- GitLab