mirror of https://gitlab.com/bashrc2/epicyon
Handle cases with no avatar image
parent
b3597e19a6
commit
bdfd1c1030
|
@ -6074,7 +6074,7 @@ def htmlProfileAfterSearch(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
if len(profileDescriptionShort) > 256:
|
if len(profileDescriptionShort) > 256:
|
||||||
profileDescriptionShort = ''
|
profileDescriptionShort = ''
|
||||||
# remove formatting from profile description used on title
|
# remove formatting from profile description used on title
|
||||||
avatarDescription = ' '
|
avatarDescription = ''
|
||||||
if profileJson.get('summary'):
|
if profileJson.get('summary'):
|
||||||
if isinstance(profileJson['summary'], str):
|
if isinstance(profileJson['summary'], str):
|
||||||
avatarDescription = profileJson['summary'].replace('<br>', '\n')
|
avatarDescription = profileJson['summary'].replace('<br>', '\n')
|
||||||
|
@ -6082,11 +6082,11 @@ def htmlProfileAfterSearch(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
avatarDescription = avatarDescription.replace('</p>', '')
|
avatarDescription = avatarDescription.replace('</p>', '')
|
||||||
profileStr = ' <div class="hero-image">'
|
profileStr = ' <div class="hero-image">'
|
||||||
profileStr += ' <div class="hero-text">'
|
profileStr += ' <div class="hero-text">'
|
||||||
print('avatarDescription: ' + str(avatarDescription))
|
if avatarUrl:
|
||||||
profileStr += \
|
profileStr += \
|
||||||
' <img loading="lazy" src="' + avatarUrl + \
|
' <img loading="lazy" src="' + avatarUrl + \
|
||||||
'" alt="' + avatarDescription + '" title="' + \
|
'" alt="' + avatarDescription + '" title="' + \
|
||||||
avatarDescription + '" class="title">'
|
avatarDescription + '" class="title">'
|
||||||
profileStr += ' <h1>' + displayName + '</h1>'
|
profileStr += ' <h1>' + displayName + '</h1>'
|
||||||
profileStr += ' <p><b>@' + searchNickname + '@' + \
|
profileStr += ' <p><b>@' + searchNickname + '@' + \
|
||||||
searchDomainFull + '</b></p>'
|
searchDomainFull + '</b></p>'
|
||||||
|
|
Loading…
Reference in New Issue