blob: 1c425c7ed44e66a1156762beada20254d9c72ec0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
## articles.html
<%inherit file="base.html"/>
<%
import utils
%>
<h1><div class="right innerlogo"><a href="/"><img src="/img/tuxrss.png" title="What's new today?"/></a>
</div><a name="top"><a href="/">pyAggr3g470r - News aggregator</a></a></h1>
<a href="http://bitbucket.org/cedricbonhomme/pyaggr3g470r/" rel="noreferrer" target="_blank">pyAggr3g470r (source code)</a>
<div class="right inner">
<a href="/mark_as_read/Feed:${feed['feed_id']}">Mark all articles from this feed as read</a>
<br />
<form method=get action="/search/Feed${feed['feed_id']}">
<input type="search" name="query" value="" placeholder="Search this feed" maxlength=2048 autocomplete="on">
</form>
<hr />
</div>
<div class="left inner">
<h1>Articles of the feed <i><a href="/feed/${feed['feed_id']}">${feed['feed_title']}</a></i></h1>
<br />
%for article in articles:
<%
if article["article_readed"] == False:
not_read_begin, not_read_end = "<b>", "</b>"
else:
not_read_begin, not_read_end = "", ""
if article["article_like"] == True:
like = """ <img src="/img/heart.png" title="I like this article!" />"""
else:
like = ""
article_content = utils.clear_string(article["article_content"])
if article_content:
description = " ".join(article_content[:500].split(' ')[:-1])
else:
description = "No description."
%>
${article["article_date"].strftime('%Y-%m-%d %H:%M')} - <a class="tooltip" href="/article/${feed['feed_id']}:${article['article_id']}" rel="noreferrer" target="_blank">${not_read_begin}${article["article_title"][:150]}${not_read_end}<span class="classic">${description}</span></a>
<br />
%endfor
<h4><a href="/">All feeds</a></h4>
|