mirror of https://gitlab.com/bashrc2/epicyon
Newswire and links on front page
parent
fe81ace3cb
commit
373c107d89
|
@ -3386,14 +3386,14 @@ def htmlProfile(iconsAsButtons: bool, defaultTimeline: str,
|
||||||
if not iconsAsButtons:
|
if not iconsAsButtons:
|
||||||
loginButton += \
|
loginButton += \
|
||||||
' <a class="imageAnchorMobile" href="' + \
|
' <a class="imageAnchorMobile" href="' + \
|
||||||
usersPath + '/newswiremobile">' + \
|
'/users/news/newswiremobile">' + \
|
||||||
'<img loading="lazy" src="/' + iconsDir + \
|
'<img loading="lazy" src="/' + iconsDir + \
|
||||||
'/newswire.png" title="' + translate['News'] + \
|
'/newswire.png" title="' + translate['News'] + \
|
||||||
'" alt="| ' + translate['News'] + \
|
'" alt="| ' + translate['News'] + \
|
||||||
'" class="timelineicon"/></a>\n'
|
'" class="timelineicon"/></a>\n'
|
||||||
loginButton += \
|
loginButton += \
|
||||||
' <a class="imageAnchorMobile" href="' + \
|
' <a class="imageAnchorMobile" href="' + \
|
||||||
usersPath + '/linksmobile">' + \
|
'/users/news/linksmobile">' + \
|
||||||
'<img loading="lazy" src="/' + iconsDir + \
|
'<img loading="lazy" src="/' + iconsDir + \
|
||||||
'/links.png" title="' + translate['Edit Links'] + \
|
'/links.png" title="' + translate['Edit Links'] + \
|
||||||
'" alt="| ' + translate['Edit Links'] + \
|
'" alt="| ' + translate['Edit Links'] + \
|
||||||
|
@ -3404,13 +3404,13 @@ def htmlProfile(iconsAsButtons: bool, defaultTimeline: str,
|
||||||
else:
|
else:
|
||||||
loginButton += \
|
loginButton += \
|
||||||
' <a href="' + \
|
' <a href="' + \
|
||||||
usersPath + '/newswiremobile' + \
|
'/users/news/newswiremobile' + \
|
||||||
'"><button class="buttonMobile">' + \
|
'"><button class="buttonMobile">' + \
|
||||||
'<span>' + translate['Newswire'] + \
|
'<span>' + translate['Newswire'] + \
|
||||||
'</span></button></a>\n'
|
'</span></button></a>\n'
|
||||||
loginButton += \
|
loginButton += \
|
||||||
' <a href="' + \
|
' <a href="' + \
|
||||||
usersPath + '/linksmobile' + \
|
'/users/news/linksmobile' + \
|
||||||
'"><button class="buttonMobile">' + \
|
'"><button class="buttonMobile">' + \
|
||||||
'<span>' + translate['Links'] + \
|
'<span>' + translate['Links'] + \
|
||||||
'</span></button></a>\n'
|
'</span></button></a>\n'
|
||||||
|
@ -5899,7 +5899,10 @@ def htmlLinksMobile(baseDir: str, nickname: str, domainFull: str,
|
||||||
iconsDir = getIconsDir(baseDir)
|
iconsDir = getIconsDir(baseDir)
|
||||||
|
|
||||||
# is the user a site editor?
|
# is the user a site editor?
|
||||||
editor = isEditor(baseDir, nickname)
|
if nickname == 'news':
|
||||||
|
editor = False
|
||||||
|
else:
|
||||||
|
editor = isEditor(baseDir, nickname)
|
||||||
|
|
||||||
htmlStr = htmlHeader(cssFilename, profileStyle)
|
htmlStr = htmlHeader(cssFilename, profileStyle)
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
|
@ -5940,11 +5943,17 @@ def htmlNewswireMobile(baseDir: str, nickname: str,
|
||||||
|
|
||||||
iconsDir = getIconsDir(baseDir)
|
iconsDir = getIconsDir(baseDir)
|
||||||
|
|
||||||
# is the user a moderator?
|
if nickname == 'news':
|
||||||
moderator = isModerator(baseDir, nickname)
|
editor = False
|
||||||
|
moderator = False
|
||||||
|
else:
|
||||||
|
# is the user a moderator?
|
||||||
|
moderator = isModerator(baseDir, nickname)
|
||||||
|
|
||||||
# is the user a site editor?
|
# is the user a site editor?
|
||||||
editor = isEditor(baseDir, nickname)
|
editor = isEditor(baseDir, nickname)
|
||||||
|
|
||||||
|
showPublishButton = editor
|
||||||
|
|
||||||
htmlStr = htmlHeader(cssFilename, profileStyle)
|
htmlStr = htmlHeader(cssFilename, profileStyle)
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
|
@ -5952,7 +5961,7 @@ def htmlNewswireMobile(baseDir: str, nickname: str,
|
||||||
httpPrefix, translate,
|
httpPrefix, translate,
|
||||||
iconsDir, moderator, editor,
|
iconsDir, moderator, editor,
|
||||||
newswire, positiveVoting,
|
newswire, positiveVoting,
|
||||||
True, timelinePath, True,
|
True, timelinePath, showPublishButton,
|
||||||
showPublishAsIcon, True, False)
|
showPublishAsIcon, True, False)
|
||||||
htmlStr += htmlFooter()
|
htmlStr += htmlFooter()
|
||||||
return htmlStr
|
return htmlStr
|
||||||
|
|
Loading…
Reference in New Issue