diff --git a/dist/css/styles.css b/dist/css/styles.css index dcff563..fd91cc4 100644 --- a/dist/css/styles.css +++ b/dist/css/styles.css @@ -767,6 +767,9 @@ input[type="submit"]:hover, float: left; width: 100%; } +#post .comment .meta p.stickied { + color: green; +} #post .comment .meta p.author a { font-weight: initial; margin-left: 10px; diff --git a/inc/compilePostComments.js b/inc/compilePostComments.js index 2e48b1f..37d940c 100644 --- a/inc/compilePostComments.js +++ b/inc/compilePostComments.js @@ -6,27 +6,35 @@ module.exports = function() { if(comments.author !== undefined && comments.body_html !== undefined) { let classlist = [] let submitter_link = '' + let moderator = false + let submitter = false + if(post_author === comments.author) { classlist.push('submitter') submitter_link = `[S]` + submitter = true } - if(comments.author === 'AutoModerator') { + if(comments.distinguished === 'moderator') { classlist.push('green') + moderator_badge = ` [M]` + moderator = true } comments_html = `
- ${comments.author} + ${comments.author}${moderator ? moderator_badge : ''}
${kFormatter(comments.ups)} points
${timeDifference(comments.created)}
+${comments.stickied ? 'stickied comment' : ''}
${comments.author}${comments.author === post_author ? submitter_link : ''}
+${comments.author}${submitter ? submitter_link : ''}${moderator ? moderator_badge : ''}
${kFormatter(comments.ups)} points
${timeDifference(comments.created)} -
+ +${comments.stickied ? 'stickied comment' : ''}
- ${comment.author} + ${comment.author}${moderator ? moderator_badge : ''}
${kFormatter(comment.ups)} points
${timeDifference(comment.created)}
+${comment.stickied ? 'stickied comment' : ''}
${comment.author}${comment.author === post_author ? submitter_link : ''}
+${comment.author}${submitter ? submitter_link : ''}${moderator ? moderator_badge : ''}
${kFormatter(comment.ups)} points
${timeDifference(comment.created)}
+${comment.stickied ? 'stickied comment' : ''}