mirror of https://gitlab.com/bashrc2/epicyon
Improve handling of banner images
parent
de67c5cb7f
commit
96f993d026
|
@ -3557,9 +3557,10 @@ def htmlProfile(rssIconAtTop: bool,
|
||||||
|
|
||||||
# If this is the news account then show a different banner
|
# If this is the news account then show a different banner
|
||||||
if isSystemAccount(nickname):
|
if isSystemAccount(nickname):
|
||||||
|
bannerFile, bannerFilename = getBannerFile(baseDir, nickname, domain)
|
||||||
profileHeaderStr = \
|
profileHeaderStr = \
|
||||||
'<img loading="lazy" class="timeline-banner" ' + \
|
'<img loading="lazy" class="timeline-banner" ' + \
|
||||||
'src="/users/news/banner.png" />\n'
|
'src="/users/' + nickname + '/' + bannerFile + '" />\n'
|
||||||
if loginButton:
|
if loginButton:
|
||||||
profileHeaderStr += '<center>' + loginButton + '</center>\n'
|
profileHeaderStr += '<center>' + loginButton + '</center>\n'
|
||||||
|
|
||||||
|
@ -6000,11 +6001,16 @@ def htmlLinksMobile(cssCache: {}, baseDir: str,
|
||||||
else:
|
else:
|
||||||
editor = isEditor(baseDir, nickname)
|
editor = isEditor(baseDir, nickname)
|
||||||
|
|
||||||
|
domain = domainFull
|
||||||
|
if ':' in domain:
|
||||||
|
domain = domain.split(':')[0]
|
||||||
|
|
||||||
htmlStr = htmlHeader(cssFilename, profileStyle)
|
htmlStr = htmlHeader(cssFilename, profileStyle)
|
||||||
|
bannerFile, bannerFilename = getBannerFile(baseDir, nickname, domain)
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
'<a href="/users/' + nickname + '/' + defaultTimeline + '">' + \
|
'<a href="/users/' + nickname + '/' + defaultTimeline + '">' + \
|
||||||
'<img loading="lazy" class="timeline-banner" ' + \
|
'<img loading="lazy" class="timeline-banner" ' + \
|
||||||
'src="/users/news/banner.png" /></a>\n'
|
'src="/users/' + nickname + '/' + bannerFile + '" /></a>\n'
|
||||||
|
|
||||||
htmlStr += '<center>' + \
|
htmlStr += '<center>' + \
|
||||||
headerButtonsFrontScreen(translate, nickname,
|
headerButtonsFrontScreen(translate, nickname,
|
||||||
|
@ -6063,10 +6069,12 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str,
|
||||||
showPublishButton = editor
|
showPublishButton = editor
|
||||||
|
|
||||||
htmlStr = htmlHeader(cssFilename, profileStyle)
|
htmlStr = htmlHeader(cssFilename, profileStyle)
|
||||||
|
|
||||||
|
bannerFile, bannerFilename = getBannerFile(baseDir, nickname, domain)
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
'<a href="/users/' + nickname + '/' + defaultTimeline + '">' + \
|
'<a href="/users/' + nickname + '/' + defaultTimeline + '">' + \
|
||||||
'<img loading="lazy" class="timeline-banner" ' + \
|
'<img loading="lazy" class="timeline-banner" ' + \
|
||||||
'src="/users/news/banner.png" /></a>\n'
|
'src="/users/' + nickname + '/' + bannerFile + '" /></a>\n'
|
||||||
|
|
||||||
htmlStr += '<center>' + \
|
htmlStr += '<center>' + \
|
||||||
headerButtonsFrontScreen(translate, nickname,
|
headerButtonsFrontScreen(translate, nickname,
|
||||||
|
|
Loading…
Reference in New Issue