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/feed.html | 148 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 source/templates/feed.html (limited to 'source/templates/feed.html') diff --git a/source/templates/feed.html b/source/templates/feed.html new file mode 100644 index 00000000..2dadb8b4 --- /dev/null +++ b/source/templates/feed.html @@ -0,0 +1,148 @@ +## feed.html +<%inherit file="base.html"/> +<% +import utils +%> +
+ %if articles != []: +

The feed ${feed['feed_title']} contains ${format(nb_articles_feed, ',d')} articles. + Representing ${round((nb_articles_feed / nb_articles_total) * 100, 4)} percent of the total (${format(nb_articles_total, ',d')} articles). +
+ Address of the feed: ${feed['feed_link']}. +
+ Address of the site: ${feed['site_link']}. +
+ Logo:

+ +

${(nb_unread_articles_feed == 0 and ["All articles are read"] or [''+str(nb_unread_articles_feed)+'' + ' unread article' + (nb_unread_articles_feed == 1 and [""] or ["s"])[0]])[0]}.

+ %else: +

No articles for the feed ${feed['feed_title']}. +
+ Address of the feed: ${feed['feed_link']}. +
+ Address of the site: ${feed['site_link']}.

+ %endif + + %if feed["mail"] == True: +

+ You are receiving articles from this feed to the address: ${mail_to}. + Stop receiving articles from this feed. + %if not mail_notification_enabled: +
However e-mail notification is disabled in the configuration file. + %endif +

+ %endif + + %if articles != []: +

The last article was posted ${elapsed.days} day(s) ago.
+ Daily average: ${average}, between the ${first_post_date.strftime('%Y-%m-%d')} and the ${end_post_date.strftime('%Y-%m-%d')}.

+ +
+

Recent articles

+ <% + html = "" + %> + %for article in articles: + <% + if article["article_readed"] == False: + # not readed articles are in bold + not_read_begin, not_read_end = "", "" + else: + not_read_begin, not_read_end = "", "" + + # display a heart for faved articles + if article["article_like"] == True: + like = """ """ + else: + like = "" + + # Descrition for the CSS ToolTips + article_content = utils.clear_string(article["article_content"]) + if article_content: + description = " ".join(article_content[:500].split(' ')[:-1]) + else: + description = "No description." + # Title of the article + article_title = article["article_title"] + if len(article_title) >= 80: + article_title = article_title[:80] + " ..." + + # a description line per article (date, title of the article and + # CSS description tooltips on mouse over) + html += article["article_date"].strftime('%Y-%m-%d %H:%M') + " - " + \ + """%s%s%s%s""" % \ + (feed["feed_id"], article["article_id"], not_read_begin, \ + article_title, not_read_end, description) + like + "
\n" + %> + %endfor + ${html} + + All articles    +
+ + %if nb_favorites != 0: +

+

Your favorites articles for this feed

+ <% + html = "" + %> + %for article in favorites: + <% + #descrition for the CSS ToolTips + article_content = utils.clear_string(article["article_content"]) + if article_content: + description = " ".join(article_content[:500].split(' ')[:-1]) + else: + description = "No description." + + # a description line per article (date, title of the article and + # CSS description tooltips on mouse over) + html += article["article_date"].strftime('%Y-%m-%d %H:%M') + " - " + \ + """%s%s
\n""" % \ + (feed["feed_id"], article["article_id"], article["article_title"][:150], description) + %> + %endfor + ${html} + %endif + %endif + + + +
+

Edit this feed

+
+ + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + +
+ +
+

+ (deletes corresponding articles)

+
+ + %if articles != []: +
+

Tag cloud

+
+ Minimum size of a word: + +
+
${tag_cloud}
+ %endif -- cgit