Add staff and new user colours to embedded discourse. Also link

usernames to profiles.
This commit is contained in:
Robin Ward 2014-03-20 16:04:50 -04:00
parent ebb0661029
commit f2e17af130
3 changed files with 13 additions and 3 deletions

View File

@ -47,10 +47,18 @@ article.post {
h3 {
text-align: center;
color: #4a6b82;
color: #0088cc;
font-size: 13px;
margin: 0;
word-wrap: break-word;
a.staff {
background-color: #ffffc2;
}
a.new-user {
color: lighten($primary_text_color, 35%);
}
}
}

View File

@ -17,7 +17,9 @@
<div class='author'>
<img src='<%= post.user.small_avatar_url %>'>
<h3 class='username'><%= post.user.username %></h3>
<h3 class='username'>
<a href='/users/<%= post.username %>' target="_blank" class='<% if post.user.staff? %>staff<% end %><% if post.user.new_user? %>new-user<% end %>'><%= post.user.username %></a>
</h3>
</div>
<div class='cooked'>
<%= raw post.cooked %>

View File

@ -46,7 +46,7 @@
}
// Adjust all names
var names = document.querySelectorAll('.username');
var names = document.querySelectorAll('.username a');
for (i=0; i<names.length; i++) {
var username = names[i].innerHTML;
if (username) {