feat: bring up adminLabel

0.2.5(deprecated)
SukkaW 7 years ago
parent d02ce67c07
commit 3d5dac67fd

@ -239,6 +239,7 @@
* disqusjs.config,api - Where to get data
* disqusjs.config.apikey - The apikey used to request Disqus API
* disqusjs.config.admin - The disqus forum admin username
* disqusjs.config.adminLabel - The disqus moderator badge text
*
* DisqusJS Info
* disqusjs.page.id = The thread id, used at next API call
@ -549,6 +550,10 @@ renderComment = (data) => {
comment.authorEl = `${comment.author.name}`
}
if (comment.author.name === disqusjs.config.admin) {
comment.authorEl += `<span class="dsqjs-admin-badge">${disqusjs.config.adminLabel}</span>`
}
s.nesting = nesting + 1
html += `<li class="dsqjs-item" id="comment-${comment.id}">`
@ -577,6 +582,10 @@ renderComment = (data) => {
comment.authorEl = `${comment.author.name}`
}
if (comment.author.name === disqusjs.config.admin) {
comment.authorEl += `<span class="dsqjs-admin-badge">${disqusjs.config.adminLabel}</span>`
}
if (s.children) {
s.nesting = 1
}

@ -78,6 +78,21 @@
font-weight: 700;
}
#dsqjs .dsqjs-author .dsqjs-admin-badge {
color: #fff;
background: #687a86;
padding: 1px 3px;
margin-left: 4px;
font-size: 12px;
line-height: 1.1;
font-weight: 700;
border-radius: 3px;
display: inline-block;
position: relative;
top: -1px;
left: 1px;
}
#dsqjs .dsqjs-meta {
font-size: 12px;
color: #656c7a;

Loading…
Cancel
Save