From 9731e3604fe360f662a042f3249bb39ddec6adf5 Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Wed, 11 Jun 2014 23:55:06 +0200 Subject: redoing home page --- pyaggr3g470r/templates/article.html | 16 ++++--- pyaggr3g470r/templates/home.html | 71 ------------------------------ pyaggr3g470r/templates/reader.html | 88 +++++++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 76 deletions(-) delete mode 100644 pyaggr3g470r/templates/home.html create mode 100644 pyaggr3g470r/templates/reader.html (limited to 'pyaggr3g470r/templates') diff --git a/pyaggr3g470r/templates/article.html b/pyaggr3g470r/templates/article.html index 1ee86948..2dbdb8de 100644 --- a/pyaggr3g470r/templates/article.html +++ b/pyaggr3g470r/templates/article.html @@ -9,12 +9,18 @@

{{ article.title|safe }}

{{ _('from') }} {{ article.source.title }}

- {% if article.like %} - - {% else %} - + + {% if article.like %} + + {% else %} + + {% endif %} + + {% if article.readed %} + + {% else %} + {% endif %} -
{{ article.date | datetime }}
diff --git a/pyaggr3g470r/templates/home.html b/pyaggr3g470r/templates/home.html deleted file mode 100644 index 297e0214..00000000 --- a/pyaggr3g470r/templates/home.html +++ /dev/null @@ -1,71 +0,0 @@ - {% extends "layout.html" %} -{% block content %} -
-
- -
- {% if result|count == 0 %} -

{{ _("You don't have any feeds.") }}

-

{{ _('Add some') }}, {{ _('or') }} {{ _('upload an OPML file.') }}

- {% else %} - {% for feed in result|sort(attribute="title") %} -
-
-
-

{{ feed.title|safe }} - {% if feed.nb_unread != 0 %} - {{ feed.nb_unread }} - {% endif %}

- - - - {% if feed.enabled %} - - {% endif %} - {% if feed.nb_unread != 0 %} - - {% endif %} - -
-
- {% for number in range(0, feed.articles.all()|count-(feed.articles.all()|count % 3), 3) %} -
- {% for n in range(number, number+3) %} -
- {% if feed.articles[n].readed %}

{% else %}

{% endif %} - {{ feed.articles[n].title|safe }} - {% if feed.articles[n].readed %}

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

{% else %}

{% endif %} - {{ feed.articles[n].title|safe }} - {% if feed.articles[n].readed %}

{% else %}{% endif %} -
{{ feed.articles[n].date | datetime }}
-
- {% endfor %} -
- {% endif %} - {% endfor %} - {% endif %} -
-
-
-{% endblock %} diff --git a/pyaggr3g470r/templates/reader.html b/pyaggr3g470r/templates/reader.html new file mode 100644 index 00000000..a2b4481c --- /dev/null +++ b/pyaggr3g470r/templates/reader.html @@ -0,0 +1,88 @@ +{% extends "layout.html" %} +{% block content %} + +
+

{{ _('Your articles') }} ({{ articles.__len__() }})

+
+ {% if filter_ == 'all' %}{% endif %} + {{ _('All') }} + {% if filter_ == 'all' %}{% endif %} + | + {% if filter_ == 'read' %}{% endif %} + {{ _('Read') }} + {% if filter_ == 'read' %}{% endif %} + | + {% if filter_ == 'unread' %}{% endif %} + {{ _('Unread') }} + {% if filter_ == 'unread' %}{% endif %} + - + {% if limit == 10 %}{% endif %} + {{ _(10) }} + {% if limit == 10 %}{% endif %} + | + {% if limit == 100 %}{% endif %} + {{ _(100) }} + {% if limit == 100 %}{% endif %} + | + {% if limit == 1000 %}{% endif %} + {{ _(1000) }} + {% if limit == 1000 %}{% endif %} + | + {% if limit == 'all' %}{% endif %} + {{ _('All') }} + {% if limit == 'all' %}{% endif %} + +
+
+ + + + + + + + + + + {% for article in articles %} + + + + + + + {% endfor %} + +
{{ _('Feed') }}{{ _('Article') }}{{ _('Date') }}
{{ article.source.title|safe }}{{ article.title|safe }}{{ article.date|datetime }} + + + {% if article.like %} + + {% else %} + + {% endif %} + + {% if article.readed %} + + {% else %} + + {% endif %} +
+
+
+{% endblock %} -- cgit