From bd0bdc2d1b16d1c5f05e670e6b36c31a5d2ae5d5 Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Wed, 10 Jun 2015 17:51:34 +0200 Subject: redoing home page in a more 'bootstrapy' way --- pyaggr3g470r/templates/home.html | 207 ++++++++++++++++++++----------------- pyaggr3g470r/templates/layout.html | 31 +++--- 2 files changed, 127 insertions(+), 111 deletions(-) (limited to 'pyaggr3g470r') diff --git a/pyaggr3g470r/templates/home.html b/pyaggr3g470r/templates/home.html index dbb95451..6d1ca85e 100644 --- a/pyaggr3g470r/templates/home.html +++ b/pyaggr3g470r/templates/home.html @@ -6,104 +6,119 @@

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

{% else %} - + + {% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} +
+ {% block messages %} + {{ super() }} + {% endblock %} +
+ {% endif %} + {% endwith %} +
+ - {% endif %} -
+ {% if articles | count != 0%} +
+ + + + + + + + + + + {% for article in articles %} + + + + + + + {% endfor %} + +
{{ _('Feed') }}{{ _('Article') }}{{ _('Date') }}
+ + {% if article.like %} + + {% else %} + + {% endif %} + {% if article.readed %} + + {% else %} + + {% if filter_ == 'all' %}{% endif %} + {% endif %} + {{ article.source.title|safe }} + {{ article.title|safe }} + {{ article.date|datetime }}
+
+ {% endif %} + + + + {% endif %} {% endblock %} diff --git a/pyaggr3g470r/templates/layout.html b/pyaggr3g470r/templates/layout.html index 80c74703..c66cce3e 100644 --- a/pyaggr3g470r/templates/layout.html +++ b/pyaggr3g470r/templates/layout.html @@ -129,29 +129,30 @@ -
-
- {% with messages = get_flashed_messages(with_categories=true) %} - {% if messages %} - {% for category, message in messages %} -
- - {{ message }} -
- {% endfor %} - {% endif %} - {% endwith %} +
+ {% block messages %} + {% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} + {% for category, message in messages %} +
+ + {{ message }} +
+ {% endfor %} + {% endif %} + {% endwith %} + {% endblock %}
{% block content %}{% endblock %} - - - + + +