From 5780ba6440753ffaf2d35a85a83f1449338c44fc Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 5 Nov 2013 07:59:34 +0100 Subject: Minor improvement for the /unread tempate. --- pyaggr3g470r/templates/unread.html | 52 ++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 24 deletions(-) (limited to 'pyaggr3g470r/templates') diff --git a/pyaggr3g470r/templates/unread.html b/pyaggr3g470r/templates/unread.html index 46842382..e962a9f1 100644 --- a/pyaggr3g470r/templates/unread.html +++ b/pyaggr3g470r/templates/unread.html @@ -1,37 +1,41 @@ {% extends "layout.html" %} {% block content %}
- {% for feed in feeds %} -
-
-

{{ feed.title }}

- -
-
- {% for number in range(0, feed.articles|length-(feed.articles|length % 3), 3) %} + {% if feeds|count == 0 %} +

No unread articles.

+ {% else %} + {% for feed in feeds %}
- {% for n in range(number, number+3) %} -
- {% if feed.articles[n].readed %}

{% else %}

{% endif %} - {{ feed.articles[n].title }}

- {% if feed.articles[n].readed %}

{% else %}{% endif %} -
{{ feed.articles[n].date }}
+
+

{{ feed.title }}

+
- {% endfor %}
- {% endfor %} - {% if feed.articles|length % 3 != 0 %} -
- {% for n in range(0, feed.articles|length % 3) %} + {% for number in range(0, feed.articles|length-(feed.articles|length % 3), 3) %} +
+ {% for n in range(number, number+3) %}
{% if feed.articles[n].readed %}

{% else %}

{% endif %} {{ feed.articles[n].title }}

{% if feed.articles[n].readed %}

{% else %}{% endif %}
{{ feed.articles[n].date }}
- {% endfor %} -
- {% endif %} - {% endfor %} + {% endfor %} +
+ {% endfor %} + {% if feed.articles|length % 3 != 0 %} +
+ {% for n in range(0, feed.articles|length % 3) %} +
+ {% if feed.articles[n].readed %}

{% else %}

{% endif %} + {{ feed.articles[n].title }}

+ {% if feed.articles[n].readed %}

{% else %}{% endif %} +
{{ feed.articles[n].date }}
+
+ {% endfor %} +
+ {% endif %} + {% endfor %} + {% endif}
-{% endblock %} \ No newline at end of file +{% endblock %} -- cgit