forked from indymedia/epicyon
Show number of likes in title
parent
31e40671a9
commit
a5e32811d4
|
@ -3816,7 +3816,11 @@ def individualPostAsHtml(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
likeIcon = 'like_inactive.png'
|
likeIcon = 'like_inactive.png'
|
||||||
likeLink = 'like'
|
likeLink = 'like'
|
||||||
likeTitle = translate['Like this post']
|
likeTitle = translate['Like this post']
|
||||||
if noOfLikes(postJsonObject) > 0:
|
likeCount = noOfLikes(postJsonObject)
|
||||||
|
likeCountStr = ''
|
||||||
|
if likeCount > 0:
|
||||||
|
if likeCount > 1:
|
||||||
|
likeCountStr = ' (' + str(likeCount) + ')'
|
||||||
likeIcon = 'like.png'
|
likeIcon = 'like.png'
|
||||||
if likedByPerson(postJsonObject, nickname, fullDomain):
|
if likedByPerson(postJsonObject, nickname, fullDomain):
|
||||||
likeLink = 'unlike'
|
likeLink = 'unlike'
|
||||||
|
@ -3827,9 +3831,10 @@ def individualPostAsHtml(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
pageNumberParam + \
|
pageNumberParam + \
|
||||||
'?actor=' + postJsonObject['actor'] + \
|
'?actor=' + postJsonObject['actor'] + \
|
||||||
'?bm=' + timelinePostBookmark + \
|
'?bm=' + timelinePostBookmark + \
|
||||||
'?tl=' + boxName + '" title="' + likeTitle + '">'
|
'?tl=' + boxName + '" title="' + \
|
||||||
|
likeTitle + likeCountStr + '">'
|
||||||
likeStr += \
|
likeStr += \
|
||||||
'<img loading="lazy" title="' + likeTitle + \
|
'<img loading="lazy" title="' + likeTitle + likeCountStr + \
|
||||||
'" alt="' + likeTitle + \
|
'" alt="' + likeTitle + \
|
||||||
' |" src="/' + iconsDir + '/' + likeIcon + '"/></a>'
|
' |" src="/' + iconsDir + '/' + likeIcon + '"/></a>'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue