From a1020cde7dc044e414540b8ccce6f3c21abc3a8c Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Wed, 27 Nov 2019 15:00:42 +0100 Subject: [PATCH] Show links to community translated posts --- blog/static/css/main.css | 4 ++++ blog/templates/macros.html | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/blog/static/css/main.css b/blog/static/css/main.css index 69a4a432..0cbfb05f 100644 --- a/blog/static/css/main.css +++ b/blog/static/css/main.css @@ -102,6 +102,10 @@ main img { margin-left: 5px; } +.post-translation { + margin-top: .3rem; +} + .post-category { margin-right: 0.5rem; text-transform: uppercase; diff --git a/blog/templates/macros.html b/blog/templates/macros.html index 406a1ef2..962776e8 100644 --- a/blog/templates/macros.html +++ b/blog/templates/macros.html @@ -4,6 +4,14 @@
{{ page.summary | safe}} read more… + + {% set translations = page.translations | filter(attribute="lang", value=lang) %} + {% if translations %} +
+ {% set post = translations.0 %} + Community Translation: {{ post.title }} +
+ {% endif %}
{% endmacro post_link %}