aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/templates/home.html
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2014-04-08 09:03:02 +0200
committerCédric Bonhomme <kimble.mandel@gmail.com>2014-04-08 09:03:02 +0200
commitad765fdca1663d665dda418a52197d52fd54d26f (patch)
treecaa8dc30a357a8cccc4874f840eea182696f395d /pyaggr3g470r/templates/home.html
parentFixed /feeds template (2). (diff)
downloadnewspipe-ad765fdca1663d665dda418a52197d52fd54d26f.tar.gz
newspipe-ad765fdca1663d665dda418a52197d52fd54d26f.tar.bz2
newspipe-ad765fdca1663d665dda418a52197d52fd54d26f.zip
Improved articles loading for the home page.
Diffstat (limited to 'pyaggr3g470r/templates/home.html')
-rw-r--r--pyaggr3g470r/templates/home.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/pyaggr3g470r/templates/home.html b/pyaggr3g470r/templates/home.html
index 8a4e429d..223653c1 100644
--- a/pyaggr3g470r/templates/home.html
+++ b/pyaggr3g470r/templates/home.html
@@ -1,10 +1,10 @@
{% extends "layout.html" %}
{% block content %}
<div class="container">
- {% if feeds|count == 0 %}
+ {% if user.feeds.all()|count == 0 %}
<h1>You are not subscribed to any feed. <a href="/edit_feed/">Fix this</a>.</h1>
{% else %}
- {% for feed in feeds|sort(attribute="title") %}
+ {% for feed in user.feeds|sort(attribute="title") %}
<div class="row">
<div class="col-md-6 col-md-offset-3">
<h1>{{ feed.title|safe }}</h1>
@@ -17,7 +17,7 @@
<a href="/mark_as_read/{{ feed.id }}"><i class="glyphicon glyphicon-check" title="Mark all as read"></i></a>
</div>
</div>
- {% for number in range(0, feed.articles.all()|count-(feed.articles.all()|count % 3), 3) %}
+ {% for number in range(0, feed.articles[0:9]|count-(feed.articles[0:9]|count % 3), 3) %}
<div class="row">
{% for n in range(number, number+3) %}
<div class="col-xs-6 col-sm-4 col-md-4">
@@ -29,9 +29,9 @@
{% endfor %}
</div>
{% endfor %}
- {% if feed.articles.all()|count % 3 != 0 %}
+ {% if feed.articles[0:9]|count % 3 != 0 %}
<div class="row">
- {% for n in range(feed.articles.all()|count-(feed.articles.all()|count % 3), feed.articles.all()|count) %}
+ {% for n in range(feed.articles[0:9]|count-(feed.articles[0:9]|count % 3), feed.articles[0:9]|count) %}
<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|safe }}</a>
bgstack15