aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/templates
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-05-23 18:08:44 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-05-23 18:08:44 +0200
commit8f008278e0eb4f0c523ba301e13d4b03113927dc (patch)
tree6f434968267283d5f4ce2f730b2e2982c82787b5 /pyaggr3g470r/templates
parentReduce space between items of lists. (diff)
downloadnewspipe-8f008278e0eb4f0c523ba301e13d4b03113927dc.tar.gz
newspipe-8f008278e0eb4f0c523ba301e13d4b03113927dc.tar.bz2
newspipe-8f008278e0eb4f0c523ba301e13d4b03113927dc.zip
Feeds with unread articles are displayed before.
Diffstat (limited to 'pyaggr3g470r/templates')
-rw-r--r--pyaggr3g470r/templates/home.html14
-rw-r--r--pyaggr3g470r/templates/layout.html3
2 files changed, 7 insertions, 10 deletions
diff --git a/pyaggr3g470r/templates/home.html b/pyaggr3g470r/templates/home.html
index 9fb1d57c..e453663c 100644
--- a/pyaggr3g470r/templates/home.html
+++ b/pyaggr3g470r/templates/home.html
@@ -3,11 +3,11 @@
<div class="container-fluid">
<div classe="row">
<div class="col-md-3">
- <ul class="nav navbarfeed">
- {% for feed in result|sort(attribute="title") %}
- <li class="navbarfeed">
+ <ul class="nav">
+ {% for feed in result|sort(attribute="title")|sort(attribute="nb_unread", reverse=True) %}
+ <li>
<a href="#{{ feed.id }}">
- {% if unread[feed.id] != 0 %}<span class="badge pull-right">{{ unread[feed.id] }}</span>{% endif %}
+ {% if feed.nb_unread != 0 %}<span class="badge pull-right">{{ feed.nb_unread }}</span>{% endif %}
{{ feed.title|safe }}
</a>
</li>
@@ -22,8 +22,8 @@
<div class="row" id="{{ feed.id }}">
<div class="col-md-6 col-md-offset-3">
<h1>{{ feed.title|safe }}
- {% if unread[feed.id] != 0 %}
- <a href="/unread/{{ feed.id }}" title="Unread articles"><span class="badge">{{ unread[feed.id] }}</span></a>
+ {% if feed.nb_unread != 0 %}
+ <a href="/unread/{{ feed.id }}" title="Unread articles"><span class="badge">{{ feed.nb_unread }}</span></a>
{% endif %}</h1>
<a href="/articles/{{ feed.id }}/100"><i class="glyphicon glyphicon-th-list" title="{{ _('More articles') }}"></i></a>
<a href="/feed/{{ feed.id }}"><i class="glyphicon glyphicon-info-sign" title="{{ _('Details') }}"></i></a>
@@ -31,7 +31,7 @@
{% if feed.enabled %}
<a href="/fetch/{{ feed.id }}"><i class="glyphicon glyphicon-cloud-download" title="{{ _('Fetch this feed') }}"></i></a>
{% endif %}
- {% if unread[feed.id] != 0 %}
+ {% if feed.nb_unread != 0 %}
<a href="/mark_as_read/{{ feed.id }}"><i class="glyphicon glyphicon-check" title="{{ _('Mark all as read') }}"></i></a>
{% endif %}
</div>
diff --git a/pyaggr3g470r/templates/layout.html b/pyaggr3g470r/templates/layout.html
index 31e8df72..41c1e503 100644
--- a/pyaggr3g470r/templates/layout.html
+++ b/pyaggr3g470r/templates/layout.html
@@ -18,9 +18,6 @@ deployed on Heroku or on a traditional server." />
<!-- Add custom CSS here -->
<style>
body {margin-top: 60px;}
- li.navbarfeed {
- margin: -10px;
- }
</style>
</head>
bgstack15