Announce icon

master
Bob Mottram 2019-08-22 10:23:04 +01:00
parent 376fa17853
commit cc38d8cc62
2 changed files with 26 additions and 19 deletions

View File

@ -394,6 +394,10 @@ a:link {
color: var(--main-fg-color);
}
.announce {
width: 50px;
}
.darker {
background-color: var(--main-bg-color-reply);
}

View File

@ -1124,12 +1124,15 @@ def individualPostAsHtml(baseDir: str, \
messageId=postJsonObject['id'].replace('/activity','')
titleStr+='<a href="'+messageId+'">@'+actorNickname+'@'+actorDomain+'</a>'
if isAnnounced and postJsonObject['object'].get('attributedTo'):
if isAnnounced:
if postJsonObject['object'].get('attributedTo'):
announceNickname=getNicknameFromActor(postJsonObject['object']['attributedTo'])
announceDomain,announcePort=getDomainFromActor(postJsonObject['object']['attributedTo'])
titleStr+=' <i class="replyingto">announced</i> <a href="'+postJsonObject['object']['id']+'">@'+announceNickname+'@'+announceDomain+'</a>'
if not isAnnounced and postJsonObject['object'].get('inReplyTo'):
titleStr+=' <img src="/icons/repeat_inactive.png" class="announce"/> <a href="'+postJsonObject['object']['id']+'">@'+announceNickname+'@'+announceDomain+'</a>'
else:
titleStr+=' <img src="/icons/repeat_inactive.png" class="announce"/> <a href="'+postJsonObject['object']['id']+'">@unattributed</a>'
else:
if postJsonObject['object'].get('inReplyTo'):
containerClassIcons='containericons darker'
containerClass='container darker'
avatarPosition=' class="right"'