From a16dfc3e6a14803d02f1626755bc2f8d6e1739e3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 2 Nov 2020 17:21:33 +0000 Subject: [PATCH] Banner on edit profile screen --- webinterface.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/webinterface.py b/webinterface.py index 61e4d7fb5..e610ad6f4 100644 --- a/webinterface.py +++ b/webinterface.py @@ -1501,6 +1501,9 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str, if not os.path.isfile(actorFilename): return '' + # filename of the banner shown at the top + bannerFile, bannerFilename = getBannerFile(baseDir, nickname, domain) + isBot = '' isGroup = '' followDMs = '' @@ -1673,9 +1676,17 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str, editProfileCSS = \ editProfileCSS.replace('https://', httpPrefix + '://') - instanceStr = '' moderatorsStr = '' themesDropdown = '' + + # top banner + instanceStr = \ + '\n' + instanceStr += '\n' + adminNickname = getConfigParam(baseDir, 'admin') if adminNickname: if path.startswith('/users/' + adminNickname + '/'): @@ -1685,7 +1696,7 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str, getConfigParam(baseDir, 'instanceDescriptionShort') instanceTitle = \ getConfigParam(baseDir, 'instanceTitle') - instanceStr = '
' + instanceStr += '
' instanceStr += \ ' ' @@ -1800,9 +1811,9 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str, '

' + translate['Profile for'] + \ ' ' + nickname + '@' + domainFull + '

' editProfileForm += '
\n' - editProfileForm += \ - ' \n' + # editProfileForm += \ + # ' \n' editProfileForm += \ ' \n'