From: Andrew Dolgov Date: Mon, 13 Sep 2010 14:32:34 +0000 (+0400) Subject: digest: properly mark fresh articles X-Git-Tag: 1.5.0~435^2~1^2~3 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e638cd0201f1de0ec3c5fb42b63ca64f39ed67ed;p=tt-rss.git digest: properly mark fresh articles --- diff --git a/digest.css b/digest.css index 70728c70..2ed6aae9 100644 --- a/digest.css +++ b/digest.css @@ -209,6 +209,14 @@ a:hover { clear : left; } +#headlines ul#headlines-content li.fresh a.title { + font-weight : bold; + font-size : 16px; + display : block; + padding-left : 21px; + color : #007FFF; +} + #headlines ul#headlines-content li.unread a.title { font-weight : bold; font-size : 16px; diff --git a/digest.js b/digest.js index 8659c8fb..cb42633b 100644 --- a/digest.js +++ b/digest.js @@ -405,7 +405,15 @@ function add_headline_entry(article, feed, no_effects) { if (article.excerpt.trim() == "") article.excerpt = __("Click to expand article."); - var tmp_html = "
  • " + + var li_class = "unread"; + + var fresh_max = getInitParam("fresh_article_max_age") * 60 * 60; + var d = new Date(); + + if (d.getTime() / 1000 - article.updated < fresh_max) + li_class = "fresh"; + + var tmp_html = "
  • " + icon_part + "
    " +