digest: properly mark fresh articles

This commit is contained in:
Andrew Dolgov 2010-09-13 18:32:34 +04:00
parent 9a4dd417c4
commit e638cd0201
2 changed files with 17 additions and 1 deletions

View file

@ -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;

View file

@ -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 = "<li id=\"A-"+article.id+"\" "+style+" class=\"unread\">" +
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 = "<li id=\"A-"+article.id+"\" "+style+" class=\""+li_class+"\">" +
icon_part +
"<div class='digest-check'>" +