From 79dfa104623d51b7e0bdb411eadceda1747d0a20 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sat, 14 Sep 2013 10:44:59 +0200 Subject: Templates has been removed to the upper folder. --- source/templates/favorites.html | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 source/templates/favorites.html (limited to 'source/templates/favorites.html') diff --git a/source/templates/favorites.html b/source/templates/favorites.html new file mode 100644 index 00000000..4dd17b6b --- /dev/null +++ b/source/templates/favorites.html @@ -0,0 +1,30 @@ +## favorites.html +<%inherit file="base.html"/> +<% +import utils +%> +
+

Your favorites articles (${sum([elem.count() for elem in articles.values()])})

+ %for feed in feeds: + <% + new_feed_section = True + %> + %for article in articles[feed["feed_id"]]: + <% + if new_feed_section: + new_feed_section = False + title = """

%s

\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')} - ${article["article_title"][:150]}${description}
+ %endfor + %endfor -- cgit