Display of newswire feed

main
Bob Mottram 2020-10-04 21:53:34 +01:00
parent 3771d544da
commit a3b87d1d61
2 changed files with 18 additions and 0 deletions

View File

@ -14,11 +14,13 @@
--main-header-color-roles: #282237;
--main-fg-color: #dddddd;
--column-left-fg-color: #dddddd;
--column-right-fg-color: #dddddd;
--main-link-color: #999;
--main-link-color-hover: #bbb;
--main-visited-color: #888;
--border-color: #505050;
--border-width: 2px;
--font-size-newswire: 18px;
--font-size-header: 18px;
--font-size-header-mobile: 32px;
--font-color-header: #ccc;
@ -221,6 +223,11 @@ a:focus {
width: 50%;
}
.newswireItem {
font-size: var(--font-size-newswire);
color: var(--column-right-fg-color);
}
.new-post-text {
font-size: var(--font-size2);
font-family: Arial, Helvetica, sans-serif;

View File

@ -5337,6 +5337,16 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
return htmlStr
def htmlNewswire(newswire: str) -> str:
"""Converts a newswire dict into html
"""
htmlStr = ''
for dateStr, item in newswire.items():
htmlStr += '<p class="newswireItem">' + \
'<a href="' + item[1] + '">' + item[0] + '</a></p>'
return htmlStr
def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
httpPrefix: str, translate: {},
iconsDir: str, moderator: bool,
@ -5401,6 +5411,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
else:
htmlStr += ' <br>\n'
htmlStr += htmlNewswire(newswire)
return htmlStr