From b75b7d6a95af3f8c2ed541f131398976b97ea70a Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Thu, 13 Dec 2012 23:16:44 +0100 Subject: Indentation of the HTML template file for the /feed page --- source/templates/feed.html | 183 +++++++++++++++++++++++---------------------- 1 file changed, 92 insertions(+), 91 deletions(-) (limited to 'source/templates') diff --git a/source/templates/feed.html b/source/templates/feed.html index a558a54b..8d0871c1 100644 --- a/source/templates/feed.html +++ b/source/templates/feed.html @@ -4,122 +4,123 @@ import utils %>
-

The feed ${feed['feed_title']} contains ${nb_articles_feed} articles. -Representing ${(round(nb_articles_feed / nb_articles_total, 4)) * 100} percent of the total (${nb_articles_total}).

- -%if articles: -

${(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]}.

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

You are receiving articles from this feed to the address: ${mail_to}. - Stop receiving articles from this feed.

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

The last article was posted ${delta_today.days} day(s) ago.

- %if delta_today.days > 0: -

Daily average: ${average}, between the ${first_post_date} and the ${end_post_date}.

+

The feed ${feed['feed_title']} contains ${nb_articles_feed} articles. + Representing ${(round(nb_articles_feed / nb_articles_total, 4)) * 100} percent of the total (${nb_articles_total}).

+ + %if articles: +

${(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]}.

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

You are receiving articles from this feed to the address: ${mail_to}. + Stop receiving articles from this feed.

+ %endif -
-

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} + %if articles != []: +

The last article was posted ${delta_today.days} day(s) ago.

+ %if delta_today.days > 0: +

Daily average: ${average}, between the ${first_post_date} and the ${end_post_date}.

+ %endif - All articles    -
- %if nb_favorites != 0: -

-

Your favorites articles for this feed

+
+

Recent articles

<% - html = "" + html = "" %> - %for article in favorites: + %for article in articles: <% - #descrition for the CSS ToolTips + 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
\n""" % \ - (feed["feed_id"], article["article_id"], article["article_title"][:150], description) + """%s%s%s%s""" % \ + (feed["feed_id"], article["article_id"], not_read_begin, \ + article_title, not_read_end, description) + like + "
\n" %> %endfor ${html} - %endif -%else: -

No articles yet.

-%endif + 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 + %else: +

No articles yet.

+ %endif -
-

Edit this feed

-
- - -
-
- - -
-
- - -
+
+

Edit this feed

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

Tag cloud

-
- Minimum size of a word: - + + +
-
${tag_cloud}
-%endif \ No newline at end of file + + + %if articles != []: +
+

Tag cloud

+
+ Minimum size of a word: + +
+
${tag_cloud}
+ %endif \ No newline at end of file -- cgit