Don't show links image on mobile

main
Bob Mottram 2020-10-30 18:40:59 +00:00
parent e46dedd2af
commit a632f24541
1 changed files with 30 additions and 26 deletions

View File

@ -3567,7 +3567,7 @@ def htmlProfile(cssCache: {}, iconsAsButtons: bool,
getLeftColumnContent(baseDir, 'news', domainFull, getLeftColumnContent(baseDir, 'news', domainFull,
httpPrefix, translate, httpPrefix, translate,
iconsDir, False, iconsDir, False,
False, None, False) False, None, False, True)
profileHeaderStr += ' </td>\n' profileHeaderStr += ' </td>\n'
profileHeaderStr += ' <td valign="top" class="col-center">\n' profileHeaderStr += ' <td valign="top" class="col-center">\n'
else: else:
@ -5583,7 +5583,7 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
httpPrefix: str, translate: {}, httpPrefix: str, translate: {},
iconsDir: str, editor: bool, iconsDir: str, editor: bool,
showBackButton: bool, timelinePath: str, showBackButton: bool, timelinePath: str,
rssIconAtTop: bool) -> str: rssIconAtTop: bool, showHeaderImage: bool) -> str:
"""Returns html content for the left column """Returns html content for the left column
""" """
htmlStr = '' htmlStr = ''
@ -5592,6 +5592,7 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
if ':' in domain: if ':' in domain:
domain = domain.split(':') domain = domain.split(':')
if showHeaderImage:
leftColumnImageFilename = \ leftColumnImageFilename = \
baseDir + '/accounts/' + nickname + '@' + domain + \ baseDir + '/accounts/' + nickname + '@' + domain + \
'/left_col_image.png' '/left_col_image.png'
@ -5604,7 +5605,8 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
themeLeftColumnImageFilename = \ themeLeftColumnImageFilename = \
baseDir + '/img/left_col_image' + theme + '.png' baseDir + '/img/left_col_image' + theme + '.png'
if os.path.isfile(themeLeftColumnImageFilename): if os.path.isfile(themeLeftColumnImageFilename):
copyfile(themeLeftColumnImageFilename, leftColumnImageFilename) copyfile(themeLeftColumnImageFilename,
leftColumnImageFilename)
# show the image at the top of the column # show the image at the top of the column
editImageClass = 'leftColEdit' editImageClass = 'leftColEdit'
@ -5612,7 +5614,8 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
editImageClass = 'leftColEditImage' editImageClass = 'leftColEditImage'
htmlStr += \ htmlStr += \
'\n <center>\n' + \ '\n <center>\n' + \
' <img class="leftColImg" loading="lazy" src="/users/' + \ ' <img class="leftColImg" ' + \
'loading="lazy" src="/users/' + \
nickname + '/left_col_image.png" />\n' + \ nickname + '/left_col_image.png" />\n' + \
' </center>\n' ' </center>\n'
@ -5964,7 +5967,7 @@ def htmlLinksMobile(cssCache: {}, baseDir: str,
getLeftColumnContent(baseDir, nickname, domainFull, getLeftColumnContent(baseDir, nickname, domainFull,
httpPrefix, translate, httpPrefix, translate,
iconsDir, editor, iconsDir, editor,
True, timelinePath, True) True, timelinePath, True, False)
htmlStr += '</div>\n' + htmlFooter() htmlStr += '</div>\n' + htmlFooter()
return htmlStr return htmlStr
@ -6719,7 +6722,8 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
leftColumnStr = \ leftColumnStr = \
getLeftColumnContent(baseDir, nickname, domainFull, getLeftColumnContent(baseDir, nickname, domainFull,
httpPrefix, translate, iconsDir, httpPrefix, translate, iconsDir,
editor, False, None, rssIconAtTop) editor, False, None, rssIconAtTop,
True)
tlStr += ' <td valign="top" class="col-left">' + \ tlStr += ' <td valign="top" class="col-left">' + \
leftColumnStr + ' </td>\n' leftColumnStr + ' </td>\n'
# center column containing posts # center column containing posts