From f668f92ef7ed023ce4d191a58b67acf8f7820bfb Mon Sep 17 00:00:00 2001 From: magicfelix <felix@felix-zauberer.de> Date: Sun, 4 Oct 2020 14:02:37 +0200 Subject: [PATCH] Move language chooser to footer, closes #8 --- templates/article.html | 4 ++++ templates/base.html | 1 + templates/page.html | 6 ++++-- templates/page_default.html | 2 -- templates/page_with_button.html | 6 ++++-- templates/page_with_carousel.html | 6 ++++-- templates/page_with_carousel_button.html | 4 ++++ 7 files changed, 21 insertions(+), 8 deletions(-) diff --git a/templates/article.html b/templates/article.html index 2d4c6e5..9f5e366 100644 --- a/templates/article.html +++ b/templates/article.html @@ -86,3 +86,7 @@ </section> {% endblock content %} +{% block languagefooter %} +{% import 'translations.html' as translations with context %} +{{ translations.translations_for(article) }} +{% endblock %} diff --git a/templates/base.html b/templates/base.html index b4f6b91..c34a597 100644 --- a/templates/base.html +++ b/templates/base.html @@ -133,6 +133,7 @@ {% endfor %} </ul> </div> + {% block languagefooter %}{% endblock %} <div class="col s6"> <p style="text-align: right"> {% for text, link in MINIFOOTER_MENU %} diff --git a/templates/page.html b/templates/page.html index 3a7b457..eac7ece 100644 --- a/templates/page.html +++ b/templates/page.html @@ -40,8 +40,6 @@ <div class="row clearfix"> <div class="column full"> <h1>{{ page.title }}</h1> - {% import 'translations.html' as translations with context %} - {{ translations.translations_for(page) }} </div> </div> </div> @@ -102,3 +100,7 @@ {% endblock content %} +{% block languagefooter %} +{% import 'translations.html' as translations with context %} +{{ translations.translations_for(page) }} +{% endblock %} diff --git a/templates/page_default.html b/templates/page_default.html index 130d388..02fbf88 100644 --- a/templates/page_default.html +++ b/templates/page_default.html @@ -21,8 +21,6 @@ {% 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_button.html b/templates/page_with_button.html index c2e0a85..f37b36f 100644 --- a/templates/page_with_button.html +++ b/templates/page_with_button.html @@ -5,8 +5,6 @@ <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> @@ -76,3 +74,7 @@ </div> {% endblock %} +{% block languagefooter %} +{% import 'translations.html' as translations with context %} +{{ translations.translations_for(page) }} +{% endblock %} diff --git a/templates/page_with_carousel.html b/templates/page_with_carousel.html index c690127..6df9d2d 100644 --- a/templates/page_with_carousel.html +++ b/templates/page_with_carousel.html @@ -32,8 +32,6 @@ <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> @@ -92,3 +90,7 @@ </div> {% endif %} {% endblock %} +{% block languagefooter %} +{% import 'translations.html' as translations with context %} +{{ translations.translations_for(page) }} +{% endblock %} diff --git a/templates/page_with_carousel_button.html b/templates/page_with_carousel_button.html index 8c67ec6..2e5fdcc 100644 --- a/templates/page_with_carousel_button.html +++ b/templates/page_with_carousel_button.html @@ -26,3 +26,7 @@ </div> {% endblock %} +{% block languagefooter %} +{% import 'translations.html' as translations with context %} +{{ translations.translations_for(page) }} +{% endblock %} -- GitLab