aboutsummaryrefslogtreecommitdiff
path: root/source/templates/favorites.html
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2012-11-22 11:18:11 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2012-11-22 11:18:11 +0100
commita30f367425870f10cd95bce39e6ec13f98b73fe5 (patch)
treedb73532cbee407dd7fd41f5a8597b00b0b4f4015 /source/templates/favorites.html
parentNow using template inheritance. (diff)
downloadnewspipe-a30f367425870f10cd95bce39e6ec13f98b73fe5.tar.gz
newspipe-a30f367425870f10cd95bce39e6ec13f98b73fe5.tar.bz2
newspipe-a30f367425870f10cd95bce39e6ec13f98b73fe5.zip
Added template for the page of favorite articles.
Diffstat (limited to 'source/templates/favorites.html')
-rw-r--r--source/templates/favorites.html37
1 files changed, 37 insertions, 0 deletions
diff --git a/source/templates/favorites.html b/source/templates/favorites.html
new file mode 100644
index 00000000..6cdf34bc
--- /dev/null
+++ b/source/templates/favorites.html
@@ -0,0 +1,37 @@
+## favorites.html
+<%inherit file="base.html"/>
+<%page enable_loop="True"/>
+<%
+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="left inner">
+ <h1>Your favorites articles</h1>
+ %for feed in feeds:
+ <%
+ new_feed_section = True
+ %>
+ %for article in articles[feed["feed_id"]]:
+ %if article["article_like"]:
+ <%
+ if new_feed_section:
+ new_feed_section = False
+ title = """<h2><a name="%s"><a href="%s" rel="noreferrer"target="_blank">%s</a></a><a href="%s" rel="noreferrer" target="_blank"><img src="%s" width="28" height="28" /></a></h2>\n""" % \
+ (feed["feed_id"], feed["site_link"], feed["feed_title"], feed["feed_link"], feed["feed_image"])
+ else:
+ title = ""
+ article_content = utils.clear_string(article["article_content"])
+ if article_content:
+ description = " ".join(article_content[:500].split(' ')[:-1])
+ else:
+ description = "No description."
+ %>
+ ${title}
+
+
+ ${article["article_date"].strftime('%Y-%m-%d %H:%M')} - <a class="tooltip" href="/article/${feed['feed_id']}:${article['article_id']}" rel="noreferrer" target="_blank">${article["article_title"][:150]}<span class="classic">${description}</span></a><br />
+ %endif
+ %endfor
+ %endfor \ No newline at end of file
bgstack15