FEATURE: correct :visited styling for logged on users

This commit is contained in:
Sam 2015-07-24 12:11:41 +10:00
parent 0c267e5952
commit b22c890e4b
2 changed files with 4 additions and 1 deletions

View File

@ -3,5 +3,7 @@ import registerUnbound from 'discourse/helpers/register-unbound';
registerUnbound('topic-link', function(topic) {
var title = topic.get('fancyTitle');
var url = topic.linked_post_number ? topic.urlForPostNumber(topic.linked_post_number) : topic.get('lastUnreadUrl');
return new Handlebars.SafeString("<a href='" + url + "' class='title'>" + title + "</a>");
var extraClass = topic.get('last_read_post_number') === topic.get('highest_post_number') ? " visited" : "";
return new Handlebars.SafeString("<a href='" + url + "' class='title" + extraClass + "'>" + title + "</a>");
});

View File

@ -17,6 +17,7 @@
}
html.anon .topic-list a.title:visited:not(.badge-notification) {color: scale-color($primary, $lightness: 35%);}
.topic-list a.title.visited:not(.badge-notification) {color: scale-color($primary, $lightness: 35%);}
.topic-list {
width: 100%;