Skip to content

Commit

Permalink
🎨 匿名机制 someone 改进 #31
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jun 23, 2020
1 parent 1170238 commit 1d59a7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 32 deletions.
23 changes: 5 additions & 18 deletions src/main/resources/js/article.js
Original file line number Diff line number Diff line change
Expand Up @@ -612,29 +612,16 @@ var Comment = {
var data = comments[i]

template += '<li><div class="fn-flex">'

if (data.commentAuthorName !== 'someone') {
template += '<a rel="nofollow" href="/member/' +
data.commentAuthorName + '">'
}
template += '<a rel="nofollow" href="/member/' + data.commentAuthorName + '">'
template += '<div class="avatar tooltipped tooltipped-se" aria-label="' +
data.commentAuthorName + '" style="background-image:url('
+ data.commentAuthorThumbnailURL + ')"></div>'
if (data.commentAuthorName !== 'someone') {
template += '</a>'
}
template += '</a>'

template += '<div class="fn-flex-1">'
+ '<div class="comment-info ft-smaller">'

if (data.commentAuthorName !== 'someone') {
template += '<a class="ft-gray" rel="nofollow" href="/member/' +
data.commentAuthorName + '">'
}
template += '<div class="fn-flex-1"><div class="comment-info ft-smaller">'
template += '<a class="ft-gray" rel="nofollow" href="/member/' + data.commentAuthorName + '">'
template += data.commentAuthorName
if (data.commentAuthorName !== 'someone') {
template += '</a>'
}
template += '</a>'

template += '<span class="ft-fade"> • ' + data.timeAgo
if (data.rewardedCnt > 0) {
Expand Down
17 changes: 3 additions & 14 deletions src/main/resources/js/m-article.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,29 +397,18 @@ var Comment = {
var data = comments[i]

template += '<li><div class="fn-flex">'

if (data.commentAuthorName !== 'someone') {
template += '<a rel="nofollow" href="/member/' +
data.commentAuthorName + '">'
}
template += '<a rel="nofollow" href="/member/' + data.commentAuthorName + '">'
template += '<div class="avatar tooltipped tooltipped-se" aria-label="' +
data.commentAuthorName + '" style="background-image:url('
+ data.commentAuthorThumbnailURL + ')"></div>'
if (data.commentAuthorName !== 'someone') {
template += '</a>'
}
template += '</a>'

template += '<div class="fn-flex-1">'
+ '<div class="comment-info ft-smaller">'

if (data.commentAuthorName !== 'someone') {
template += '<a class="ft-gray" rel="nofollow" href="/member/' +
data.commentAuthorName + '">'
}
template += data.commentAuthorName
if (data.commentAuthorName !== 'someone') {
template += '</a>'
}
template += '</a>'

template += '<span class="ft-fade"> • ' + data.timeAgo
if (data.rewardedCnt > 0) {
Expand Down

0 comments on commit 1d59a7f

Please sign in to comment.