mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
highlight OP's comments
This commit is contained in:
parent
735f3cd17d
commit
a1d304445d
3 changed files with 13 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
<template name="comment_item">
|
||||
<li class="comment module comment-displayed" id="{{_id}}">
|
||||
<li class="comment module comment-displayed {{commentClass}}" id="{{_id}}">
|
||||
<div class="comment-body">
|
||||
{{#if isDeleted}}
|
||||
<div class="comment-deleted">This comment has been deleted.</div>
|
||||
|
|
|
@ -66,6 +66,12 @@ Template[getTemplate('comment_item')].helpers({
|
|||
comment_item: function () {
|
||||
return getTemplate('comment_item');
|
||||
},
|
||||
commentClass: function () {
|
||||
// if this comment was made by the post author
|
||||
if (Posts.findOne(this.postId).userId == this.userId) {
|
||||
return 'author-comment';
|
||||
}
|
||||
},
|
||||
full_date: function(){
|
||||
return this.createdAt.toString();
|
||||
},
|
||||
|
|
|
@ -316,4 +316,10 @@
|
|||
}
|
||||
#comment{
|
||||
font-size: 16px;
|
||||
}
|
||||
.author-comment{
|
||||
.comment-username{
|
||||
background: #dfdfdf;
|
||||
padding: 1px 5px;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue