forked from indymedia/epicyon
Different profile banner for system accounts
parent
b987367bda
commit
ecf807a89f
|
@ -3423,16 +3423,19 @@ def htmlProfile(defaultTimeline: str,
|
||||||
avatarDescription = profileJson['summary'].replace('<br>', '\n')
|
avatarDescription = profileJson['summary'].replace('<br>', '\n')
|
||||||
avatarDescription = avatarDescription.replace('<p>', '')
|
avatarDescription = avatarDescription.replace('<p>', '')
|
||||||
avatarDescription = avatarDescription.replace('</p>', '')
|
avatarDescription = avatarDescription.replace('</p>', '')
|
||||||
profileHeaderStr = '<div class="hero-image">'
|
profileHeaderStr = '<div class="hero-image">\n'
|
||||||
profileHeaderStr += ' <div class="hero-text">'
|
profileHeaderStr += ' <div class="hero-text">\n'
|
||||||
|
|
||||||
# TODO maybe display an alternate system account banner
|
# If this is the news account then show a different banner
|
||||||
if not isSystemAccount(nickname):
|
if isSystemAccount(nickname):
|
||||||
|
profileHeaderStr += '<div class="timeline-banner"></div>\n'
|
||||||
|
profileHeaderStr += loginButton
|
||||||
|
else:
|
||||||
profileHeaderStr += \
|
profileHeaderStr += \
|
||||||
' <img loading="lazy" src="' + profileJson['icon']['url'] + \
|
' <img loading="lazy" src="' + profileJson['icon']['url'] + \
|
||||||
'" title="' + avatarDescription + '" alt="' + \
|
'" title="' + avatarDescription + '" alt="' + \
|
||||||
avatarDescription + '" class="title">'
|
avatarDescription + '" class="title">\n'
|
||||||
profileHeaderStr += ' <h1>' + displayName + '</h1>'
|
profileHeaderStr += ' <h1>' + displayName + '</h1>\n'
|
||||||
iconsDir = getIconsDir(baseDir)
|
iconsDir = getIconsDir(baseDir)
|
||||||
profileHeaderStr += \
|
profileHeaderStr += \
|
||||||
'<p><b>@' + nickname + '@' + domainFull + '</b><br>'
|
'<p><b>@' + nickname + '@' + domainFull + '</b><br>'
|
||||||
|
@ -3440,11 +3443,12 @@ def htmlProfile(defaultTimeline: str,
|
||||||
'<a href="/users/' + nickname + \
|
'<a href="/users/' + nickname + \
|
||||||
'/qrcode.png" alt="' + translate['QR Code'] + '" title="' + \
|
'/qrcode.png" alt="' + translate['QR Code'] + '" title="' + \
|
||||||
translate['QR Code'] + '">' + \
|
translate['QR Code'] + '">' + \
|
||||||
'<img class="qrcode" src="/' + iconsDir + '/qrcode.png" /></a></p>'
|
'<img class="qrcode" src="/' + iconsDir + \
|
||||||
profileHeaderStr += ' <p>' + profileDescriptionShort + '</p>'
|
'/qrcode.png" /></a></p>\n'
|
||||||
profileHeaderStr += loginButton
|
profileHeaderStr += ' <p>' + profileDescriptionShort + '</p>\n'
|
||||||
profileHeaderStr += ' </div>'
|
profileHeaderStr += loginButton
|
||||||
profileHeaderStr += '</div>'
|
profileHeaderStr += ' </div>\n'
|
||||||
|
profileHeaderStr += '</div>\n'
|
||||||
|
|
||||||
profileStr = \
|
profileStr = \
|
||||||
linkToTimelineStart + profileHeaderStr + \
|
linkToTimelineStart + profileHeaderStr + \
|
||||||
|
|
Loading…
Reference in New Issue