aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/templates
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r/templates')
-rw-r--r--pyaggr3g470r/templates/home.html34
-rw-r--r--pyaggr3g470r/templates/unread.html34
2 files changed, 46 insertions, 22 deletions
diff --git a/pyaggr3g470r/templates/home.html b/pyaggr3g470r/templates/home.html
index 0344263f..bf17356f 100644
--- a/pyaggr3g470r/templates/home.html
+++ b/pyaggr3g470r/templates/home.html
@@ -8,18 +8,30 @@
<a href="/articles/{{ feed.id }}"><i class="glyphicon glyphicon-th-list"></i></a>
</div>
</div>
- {% for number in range(0, feed.articles|length-2, 3) %}
- <div class="row">
- {% for n in range(number, number+3) %}
- <div class="col-xs-6 col-sm-4 col-md-4">
- {% if feed.articles[n].readed %}<h3>{% else %}<h1>{% endif %}
- <a href="/article/{{ feed.articles[n].id }}">{{ feed.articles[n].title }}</a><h2>
- {% if feed.articles[n].readed %}</h3>{% else %}</h1>{% endif %}
- <h6>{{ feed.articles[n].date }}</h6>
+ {% for number in range(0, feed.articles|length-(feed.articles|length % 3), 3) %}
+ <div class="row">
+ {% for n in range(number, number+3) %}
+ <div class="col-xs-6 col-sm-4 col-md-4">
+ {% if feed.articles[n].readed %}<h3>{% else %}<h1>{% endif %}
+ <a href="/article/{{ feed.articles[n].id }}">{{ feed.articles[n].title }}</a><h2>
+ {% if feed.articles[n].readed %}</h3>{% else %}</h1>{% endif %}
+ <h6>{{ feed.articles[n].date }}</h6>
+ </div>
+ {% endfor %}
</div>
- {% endfor %}
- </div>
- {% endfor %}
+ {% endfor %}
+ {% if feed.articles|length % 3 != 0 %}
+ <div class="row">
+ {% for n in range(0, feed.articles|length % 3) %}
+ <div class="col-xs-6 col-sm-4 col-md-4">
+ {% if feed.articles[n].readed %}<h3>{% else %}<h1>{% endif %}
+ <a href="/article/{{ feed.articles[n].id }}">{{ feed.articles[n].title }}</a><h2>
+ {% if feed.articles[n].readed %}</h3>{% else %}</h1>{% endif %}
+ <h6>{{ feed.articles[n].date }}</h6>
+ </div>
+ {% endfor %}
+ </div>
+ {% endif %}
{% endfor %}
</div><!-- /.container -->
{% endblock %} \ No newline at end of file
diff --git a/pyaggr3g470r/templates/unread.html b/pyaggr3g470r/templates/unread.html
index 0344263f..bf17356f 100644
--- a/pyaggr3g470r/templates/unread.html
+++ b/pyaggr3g470r/templates/unread.html
@@ -8,18 +8,30 @@
<a href="/articles/{{ feed.id }}"><i class="glyphicon glyphicon-th-list"></i></a>
</div>
</div>
- {% for number in range(0, feed.articles|length-2, 3) %}
- <div class="row">
- {% for n in range(number, number+3) %}
- <div class="col-xs-6 col-sm-4 col-md-4">
- {% if feed.articles[n].readed %}<h3>{% else %}<h1>{% endif %}
- <a href="/article/{{ feed.articles[n].id }}">{{ feed.articles[n].title }}</a><h2>
- {% if feed.articles[n].readed %}</h3>{% else %}</h1>{% endif %}
- <h6>{{ feed.articles[n].date }}</h6>
+ {% for number in range(0, feed.articles|length-(feed.articles|length % 3), 3) %}
+ <div class="row">
+ {% for n in range(number, number+3) %}
+ <div class="col-xs-6 col-sm-4 col-md-4">
+ {% if feed.articles[n].readed %}<h3>{% else %}<h1>{% endif %}
+ <a href="/article/{{ feed.articles[n].id }}">{{ feed.articles[n].title }}</a><h2>
+ {% if feed.articles[n].readed %}</h3>{% else %}</h1>{% endif %}
+ <h6>{{ feed.articles[n].date }}</h6>
+ </div>
+ {% endfor %}
</div>
- {% endfor %}
- </div>
- {% endfor %}
+ {% endfor %}
+ {% if feed.articles|length % 3 != 0 %}
+ <div class="row">
+ {% for n in range(0, feed.articles|length % 3) %}
+ <div class="col-xs-6 col-sm-4 col-md-4">
+ {% if feed.articles[n].readed %}<h3>{% else %}<h1>{% endif %}
+ <a href="/article/{{ feed.articles[n].id }}">{{ feed.articles[n].title }}</a><h2>
+ {% if feed.articles[n].readed %}</h3>{% else %}</h1>{% endif %}
+ <h6>{{ feed.articles[n].date }}</h6>
+ </div>
+ {% endfor %}
+ </div>
+ {% endif %}
{% endfor %}
</div><!-- /.container -->
{% endblock %} \ No newline at end of file
bgstack15