diff --git a/themes/varia/templates/article.html b/themes/varia/templates/article.html index 2d9fe52..ec868c2 100644 --- a/themes/varia/templates/article.html +++ b/themes/varia/templates/article.html @@ -20,6 +20,27 @@ {% endfor %} +{% set glob={} %} +{% if article.translations %} + {% for translation in article.translations %} + {% if translation.lang == 'nl' %} + {% set _ = glob.update({'published_at': 'Published at '}) %} + {% set _ = glob.update({'translate_article': 'Lees dit artikel in het Nederlands'}) %} + {% set _ = glob.update({'related_to': ' relating to '}) %} + {% set _ = glob.update({'translation_url': translation.url}) %} + {% set _ = glob.update({'written_by': 'Written by '}) %} + {% endif %} + {% if translation.lang == 'en' %} + {% set _ = glob.update({'published_at': 'Gepubliceerd op '}) %} + {% set _ = glob.update({'translate_article': 'Read this article in English'}) %} + {% set _ = glob.update({'related_to': ' gerelateerd aan '}) %} + {% set _ = glob.update({'translation_url': translation.url}) %} + {% set _ = glob.update({'written_by': 'Geschreven door '}) %} + {% endif %} + {% endfor %} +{% endif %} + +
{{ article.title }} @@ -38,40 +59,40 @@
{% if article.event_start %} -
{{ article.event_start }}
- {% else %} -
Published: {{ article.date | strftime('%d %B %Y') }}
+
{{ article.event_start }}
{% endif %} +
{{ glob.published_at }} {{ article.date | strftime('%d %B %Y') }}
- - - + + + + {% if article.category %} - {{ article.category }} + {{ article.category }} {% endif %} - {% if article.translations %} - - {% for translation in article.translations %} - {% if translation.lang == 'nl' %}Lees dit artikel in het Nederlands - {% endif %} - {% if translation.lang == 'en' %}Read this article in English - {% endif %} - {% endfor %} - - {% endif %} {% if article.tags %} - relating to {% for tag in article.tags %} - - - {% endfor %} + {{ glob.related_to }} + {% for tag in article.tags %} + + + + {% endfor %} {% endif %} +
+ {{ glob.translate_article }} +
diff --git a/themes/varia/templates/index.html b/themes/varia/templates/index.html index 86bf94a..d5ed123 100644 --- a/themes/varia/templates/index.html +++ b/themes/varia/templates/index.html @@ -10,13 +10,30 @@ {% endif %} {% endfor %} + +{% set glob={} %} + +{% if DEFAULT_LANG == 'nl' %} + {% set _ = glob.update({'published_at': 'Gepubliceerd op '}) %} + {% set _ = glob.update({'related_to': ' gerelateerd aan '}) %} + {% set _ = glob.update({'written_by': 'Geschreven door '}) %} + {% set _ = glob.update({'read_more': 'lees meer '}) %} +{% endif %} +{% if DEFAULT_LANG == 'en' %} + {% set _ = glob.update({'published_at': 'Published at '}) %} + {% set _ = glob.update({'related_to': ' relating to '}) %} + {% set _ = glob.update({'written_by': 'Written by '}) %} + {% set _ = glob.update({'read_more': 'read more'}) %} +{% endif %} + {% block content_title %} {% endblock %} + {% if articles_page.has_other_pages() %} {% include 'pagination.html' %} {% endif %} -
+
{% for article in articles_page.object_list %} {% set thumb_size = '/thumb' %} {% if article.category %} @@ -31,27 +48,23 @@ {% endif %} {% if article.category == 'article' %} {% set thumb_size = '/thumb2x' %} - {% endif %} - {% if article.category == 'documentation' %} - {% set thumb_size = '/thumb2x' %} {% endif %} {% endif %}
{% endif %}