forked from indymedia/epicyon
Don't show image within mobile newswire
parent
ced8237af7
commit
e991224c06
|
@ -3702,7 +3702,7 @@ def htmlProfile(cssCache: {}, iconsAsButtons: bool,
|
||||||
iconsDir, False, False,
|
iconsDir, False, False,
|
||||||
newswire, False,
|
newswire, False,
|
||||||
False, None, False, False,
|
False, None, False, False,
|
||||||
False, True, authorized)
|
False, True, authorized, True)
|
||||||
profileFooterStr += ' </td>\n'
|
profileFooterStr += ' </td>\n'
|
||||||
profileFooterStr += ' </tr>\n'
|
profileFooterStr += ' </tr>\n'
|
||||||
profileFooterStr += ' </tbody>\n'
|
profileFooterStr += ' </tbody>\n'
|
||||||
|
@ -5806,7 +5806,8 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
showPublishAsIcon: bool,
|
showPublishAsIcon: bool,
|
||||||
rssIconAtTop: bool,
|
rssIconAtTop: bool,
|
||||||
publishButtonAtTop: bool,
|
publishButtonAtTop: bool,
|
||||||
authorized: bool) -> str:
|
authorized: bool,
|
||||||
|
showHeaderImage: bool) -> str:
|
||||||
"""Returns html content for the right column
|
"""Returns html content for the right column
|
||||||
"""
|
"""
|
||||||
htmlStr = ''
|
htmlStr = ''
|
||||||
|
@ -5833,30 +5834,33 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
if publishButtonAtTop:
|
if publishButtonAtTop:
|
||||||
htmlStr += '<center>' + publishButtonStr + '</center>'
|
htmlStr += '<center>' + publishButtonStr + '</center>'
|
||||||
|
|
||||||
rightColumnImageFilename = \
|
editImageClass = ''
|
||||||
baseDir + '/accounts/' + nickname + '@' + domain + \
|
if showHeaderImage:
|
||||||
'/right_col_image.png'
|
rightColumnImageFilename = \
|
||||||
if not os.path.isfile(rightColumnImageFilename):
|
baseDir + '/accounts/' + nickname + '@' + domain + \
|
||||||
theme = getConfigParam(baseDir, 'theme').lower()
|
'/right_col_image.png'
|
||||||
if theme == 'default':
|
if not os.path.isfile(rightColumnImageFilename):
|
||||||
theme = ''
|
theme = getConfigParam(baseDir, 'theme').lower()
|
||||||
else:
|
if theme == 'default':
|
||||||
theme = '_' + theme
|
theme = ''
|
||||||
themeRightColumnImageFilename = \
|
else:
|
||||||
baseDir + '/img/right_col_image' + theme + '.png'
|
theme = '_' + theme
|
||||||
if os.path.isfile(themeRightColumnImageFilename):
|
themeRightColumnImageFilename = \
|
||||||
copyfile(themeRightColumnImageFilename, rightColumnImageFilename)
|
baseDir + '/img/right_col_image' + theme + '.png'
|
||||||
|
if os.path.isfile(themeRightColumnImageFilename):
|
||||||
|
copyfile(themeRightColumnImageFilename,
|
||||||
|
rightColumnImageFilename)
|
||||||
|
|
||||||
# show the image at the top of the column
|
# show the image at the top of the column
|
||||||
editImageClass = 'rightColEdit'
|
editImageClass = 'rightColEdit'
|
||||||
if os.path.isfile(rightColumnImageFilename):
|
if os.path.isfile(rightColumnImageFilename):
|
||||||
editImageClass = 'rightColEditImage'
|
editImageClass = 'rightColEditImage'
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
'\n <center>\n' + \
|
'\n <center>\n' + \
|
||||||
' <img class="rightColImg" ' + \
|
' <img class="rightColImg" ' + \
|
||||||
'loading="lazy" src="/users/' + \
|
'loading="lazy" src="/users/' + \
|
||||||
nickname + '/right_col_image.png" />\n' + \
|
nickname + '/right_col_image.png" />\n' + \
|
||||||
' </center>\n'
|
' </center>\n'
|
||||||
|
|
||||||
if editImageClass == 'rightColEdit':
|
if editImageClass == 'rightColEdit':
|
||||||
htmlStr += '\n <center>\n'
|
htmlStr += '\n <center>\n'
|
||||||
|
@ -6026,7 +6030,7 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str,
|
||||||
newswire, positiveVoting,
|
newswire, positiveVoting,
|
||||||
True, timelinePath, showPublishButton,
|
True, timelinePath, showPublishButton,
|
||||||
showPublishAsIcon, True, False,
|
showPublishAsIcon, True, False,
|
||||||
authorized)
|
authorized, False)
|
||||||
htmlStr += htmlFooter()
|
htmlStr += htmlFooter()
|
||||||
return htmlStr
|
return htmlStr
|
||||||
|
|
||||||
|
@ -6913,7 +6917,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
False, None, True,
|
False, None, True,
|
||||||
showPublishAsIcon,
|
showPublishAsIcon,
|
||||||
rssIconAtTop, publishButtonAtTop,
|
rssIconAtTop, publishButtonAtTop,
|
||||||
authorized)
|
authorized, True)
|
||||||
tlStr += ' <td valign="top" class="col-right">' + \
|
tlStr += ' <td valign="top" class="col-right">' + \
|
||||||
rightColumnStr + ' </td>\n'
|
rightColumnStr + ' </td>\n'
|
||||||
tlStr += ' </tr>\n'
|
tlStr += ' </tr>\n'
|
||||||
|
|
Loading…
Reference in New Issue