From 22e881fa89e4b3b8f6207d2c2e8713c2ff919400 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Wed, 8 May 2013 10:54:59 +0200 Subject: Added articlelogo on main page --- theme/templates/article.html | 4 ++++ theme/templates/index.html | 24 ++++++++++++++++-------- theme/templates/menu.html | 2 +- theme/templates/translations.html | 10 ++++++++++ 4 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 theme/templates/translations.html (limited to 'theme/templates') diff --git a/theme/templates/article.html b/theme/templates/article.html index b53962d..a23074c 100755 --- a/theme/templates/article.html +++ b/theme/templates/article.html @@ -6,6 +6,9 @@

{{ article.title }}

{%include 'meta.html'%} + {% import 'translations.html' as translations with context %} + {{ translations.translations_for(article) }} +
{{ article.content }} @@ -14,6 +17,7 @@
{% if article.related_posts and article.related_posts %} +

À lire aussi :

diff --git a/theme/templates/index.html b/theme/templates/index.html index d045910..bf288a8 100755 --- a/theme/templates/index.html +++ b/theme/templates/index.html @@ -6,14 +6,22 @@ {% for article in (articles_page.object_list if articles_page else articles) %}

{{ article.title }}

- - -
- {{ article.summary }} -
- {% if not loop.last %} -
- {% endif %} + + + +
+ + {% if article.logo %} +
+ +
+ {% endif %} + + {{ article.summary }} +
+ {% if not loop.last %} +
+ {% endif %}
{% endfor %} diff --git a/theme/templates/menu.html b/theme/templates/menu.html index bab98fa..6cc3636 100755 --- a/theme/templates/menu.html +++ b/theme/templates/menu.html @@ -15,7 +15,7 @@
  • Articles
      {% for article in articles %} - {% if loop.index < FEED_MAX_ITEMS %} + {% if loop.index <= FEED_MAX_ITEMS %}
    • {{ article.title }}
    • {% endif %} {% endfor %} diff --git a/theme/templates/translations.html b/theme/templates/translations.html new file mode 100644 index 0000000..121ff1a --- /dev/null +++ b/theme/templates/translations.html @@ -0,0 +1,10 @@ +{% macro translations_for(article) %} +{% if article.translations %} +
      +Traductions : +{% for translation in article.translations %} +{{ translation.lang }} +{% endfor %} +
      +{% endif %} +{% endmacro %} -- cgit v1.2.3