aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-10-13 11:10:52 +0200
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-10-13 11:10:52 +0200
commitd33d9083c974dde2c65fe454b151aa4849d5dfbe (patch)
tree925c501d702bf628a0b74aa16c668c11b9c7e301 /pyaggr3g470r
parentUpdated README. (diff)
downloadnewspipe-d33d9083c974dde2c65fe454b151aa4849d5dfbe.tar.gz
newspipe-d33d9083c974dde2c65fe454b151aa4849d5dfbe.tar.bz2
newspipe-d33d9083c974dde2c65fe454b151aa4849d5dfbe.zip
Updated about page. Readed article title are using h3 headers and unreaded h1 headers.
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/templates/about.html9
-rw-r--r--pyaggr3g470r/templates/home.html16
-rw-r--r--pyaggr3g470r/templates/layout.html12
-rw-r--r--pyaggr3g470r/views.py2
4 files changed, 27 insertions, 12 deletions
diff --git a/pyaggr3g470r/templates/about.html b/pyaggr3g470r/templates/about.html
index 8d1c8b69..5bba9282 100644
--- a/pyaggr3g470r/templates/about.html
+++ b/pyaggr3g470r/templates/about.html
@@ -1 +1,8 @@
-
+ {% extends "layout.html" %}
+{% block content %}
+<div class="container">
+ <p>This software is under GPLv3 license. You are welcome to copy, modify or
+ redistribute the source code according to the <a href="http://www.gnu.org/licenses/gpl-3.0.txt">GPLv3</a> license.<br />
+ <a href="https://bitbucket.org/cedricbonhomme/pyaggr3g470r/" rel="noreferrer" target="_blank">Source code</a> of pyAggr3g470r.</p>
+</div><!-- /.container -->
+{% endblock %}
diff --git a/pyaggr3g470r/templates/home.html b/pyaggr3g470r/templates/home.html
index da71c881..76104e68 100644
--- a/pyaggr3g470r/templates/home.html
+++ b/pyaggr3g470r/templates/home.html
@@ -6,21 +6,29 @@
<div class="col-md-6 col-md-offset-3"><h1>{{ feed.title }}</h1></div>
</div>
{% for number in range(0, feed.articles[:10]|length-2, 3) %}
+
+
<div class="row">
<div class="col-xs-6 col-sm-4 col-md-4">
- <h2>{{ feed.articles[number].title }}<h2>
+ {% if feed.articles[number].readed %}<h3>{% else %}<h1>{% endif %}
+ {{ feed.articles[number].title }}<h2>
+ {% if feed.articles[number].readed %}</h3>{% else %}</h1>{% endif %}
<h6>{{ feed.articles[number].date }}</h6>
</div>
<div class="col-xs-6 col-sm-4 col-md-4">
- <h2>{{ feed.articles[number+1].title }}<h2>
+ {% if feed.articles[number+1].readed %}<h3>{% else %}<h1>{% endif %}
+ {{ feed.articles[number+1].title }}<h2>
+ {% if feed.articles[number+1].readed %}</h3>{% else %}</h1>{% endif %}
<h6>{{ feed.articles[number+1].date }}</h6>
</div>
<div class="col-xs-6 col-sm-4 col-md-4">
- <h2>{{ feed.articles[number+2].title }}<h2>
+ {% if feed.articles[number+2].readed %}<h3>{% else %}<h1>{% endif %}
+ {{ feed.articles[number+2].title }}<h2>
+ {% if feed.articles[number+2].readed %}</h3>{% else %}</h1>{% endif %}
<h6>{{ feed.articles[number+2].date }}</h6>
</div>
</div>
{% endfor %}
{% endfor %}
</div><!-- /.container -->
-{% endblock %}
+{% endblock %} \ No newline at end of file
diff --git a/pyaggr3g470r/templates/layout.html b/pyaggr3g470r/templates/layout.html
index b3b38dcc..9a194453 100644
--- a/pyaggr3g470r/templates/layout.html
+++ b/pyaggr3g470r/templates/layout.html
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
-
+
{% block head %}
<head>
<meta charset="utf-8">
@@ -11,7 +11,7 @@
<title>pyAggr3g470r</title>
<!-- Bootstrap core CSS -->
- <link href="static/css/bootstrap.css" rel="stylesheet">
+ <link href="/static/css/bootstrap.css" rel="stylesheet">
<!-- Add custom CSS here -->
<style>
@@ -32,7 +32,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
- <a class="navbar-brand" href="index.html">pyAggr3g470r</a>
+ <a class="navbar-brand" href="/">pyAggr3g470r</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
@@ -43,7 +43,7 @@
<li><a href="#services">History</a></li>
<li><a href="#services">Favorites</a></li>
<li><a href="#services">Unread</a></li>
- <li><a href="#about">About</a></li>
+ <li><a href="/about/">About</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container -->
@@ -55,8 +55,8 @@
<!-- Bootstrap core JavaScript -->
<!-- Placed at the end of the document so the pages load faster -->
<!-- Make sure to add jQuery - download the most recent version at http://jquery.com/ -->
- <script src="static/js/jquery.js"></script>
- <script src="static/js/bootstrap.js"></script>
+ <script src="/static/js/jquery.js"></script>
+ <script src="/static/js/bootstrap.js"></script>
</body>
</body>
</html>
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 98b1ccaa..9ca5d163 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -15,7 +15,7 @@ mail = Mail()
@app.route('/')
def home():
- feeds = models.Feed.objects()
+ feeds = models.Feed.objects().order_by('title')
return render_template('home.html', feeds=feeds)
@app.route('/fetch/', methods=['GET'])
bgstack15