mirror of https://gitlab.com/bashrc2/epicyon
Banner on edit profile screen
parent
66a44f80dd
commit
a16dfc3e6a
|
@ -1501,6 +1501,9 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
|
||||||
if not os.path.isfile(actorFilename):
|
if not os.path.isfile(actorFilename):
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
# filename of the banner shown at the top
|
||||||
|
bannerFile, bannerFilename = getBannerFile(baseDir, nickname, domain)
|
||||||
|
|
||||||
isBot = ''
|
isBot = ''
|
||||||
isGroup = ''
|
isGroup = ''
|
||||||
followDMs = ''
|
followDMs = ''
|
||||||
|
@ -1673,9 +1676,17 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
|
||||||
editProfileCSS = \
|
editProfileCSS = \
|
||||||
editProfileCSS.replace('https://', httpPrefix + '://')
|
editProfileCSS.replace('https://', httpPrefix + '://')
|
||||||
|
|
||||||
instanceStr = ''
|
|
||||||
moderatorsStr = ''
|
moderatorsStr = ''
|
||||||
themesDropdown = ''
|
themesDropdown = ''
|
||||||
|
|
||||||
|
# top banner
|
||||||
|
instanceStr = \
|
||||||
|
'<a href="/users/' + nickname + '" title="' + \
|
||||||
|
translate['Switch to profile view'] + '" alt="' + \
|
||||||
|
translate['Switch to profile view'] + '">\n'
|
||||||
|
instanceStr += '<img loading="lazy" class="timeline-banner" src="' + \
|
||||||
|
'/users/' + nickname + '/' + bannerFile + '" /></a>\n'
|
||||||
|
|
||||||
adminNickname = getConfigParam(baseDir, 'admin')
|
adminNickname = getConfigParam(baseDir, 'admin')
|
||||||
if adminNickname:
|
if adminNickname:
|
||||||
if path.startswith('/users/' + adminNickname + '/'):
|
if path.startswith('/users/' + adminNickname + '/'):
|
||||||
|
@ -1685,7 +1696,7 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
|
||||||
getConfigParam(baseDir, 'instanceDescriptionShort')
|
getConfigParam(baseDir, 'instanceDescriptionShort')
|
||||||
instanceTitle = \
|
instanceTitle = \
|
||||||
getConfigParam(baseDir, 'instanceTitle')
|
getConfigParam(baseDir, 'instanceTitle')
|
||||||
instanceStr = '<div class="container">'
|
instanceStr += '<div class="container">'
|
||||||
instanceStr += \
|
instanceStr += \
|
||||||
' <label class="labels">' + \
|
' <label class="labels">' + \
|
||||||
translate['Instance Title'] + '</label>'
|
translate['Instance Title'] + '</label>'
|
||||||
|
@ -1800,9 +1811,9 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
|
||||||
' <p class="new-post-text">' + translate['Profile for'] + \
|
' <p class="new-post-text">' + translate['Profile for'] + \
|
||||||
' ' + nickname + '@' + domainFull + '</p>'
|
' ' + nickname + '@' + domainFull + '</p>'
|
||||||
editProfileForm += ' <div class="container">\n'
|
editProfileForm += ' <div class="container">\n'
|
||||||
editProfileForm += \
|
# editProfileForm += \
|
||||||
' <a href="' + pathOriginal + '"><button class="cancelbtn">' + \
|
# ' <a href="' + pathOriginal + '"><button class="cancelbtn">' + \
|
||||||
translate['Go Back'] + '</button></a>\n'
|
# translate['Go Back'] + '</button></a>\n'
|
||||||
editProfileForm += \
|
editProfileForm += \
|
||||||
' <input type="submit" name="submitProfile" value="' + \
|
' <input type="submit" name="submitProfile" value="' + \
|
||||||
translate['Submit'] + '">\n'
|
translate['Submit'] + '">\n'
|
||||||
|
|
Loading…
Reference in New Issue