diff --git a/webinterface.py b/webinterface.py index 281b63d3..f54c67c5 100644 --- a/webinterface.py +++ b/webinterface.py @@ -1282,7 +1282,7 @@ def htmlEditLinks(cssCache: {}, translate: {}, baseDir: str, path: str, '
\n' + \ ' \n' + \ - '
\n' + '
\n' editLinksForm += \ ' \n' @@ -1365,7 +1365,7 @@ def htmlEditNewswire(cssCache: {}, translate: {}, baseDir: str, path: str, '
\n' + \ ' \n' + \ - '
\n' + '
\n' editNewswireForm += \ ' \n' @@ -5855,38 +5855,67 @@ def htmlNewswire(newswire: {}, nickname: str, moderator: bool, def htmlCitations(baseDir: str, nickname: str, domain: str, httpPrefix: str, defaultTimeline: str, - translate: {}, newswire: {}) -> str: + translate: {}, newswire: {}, cssCache: {}) -> str: """Show the citations screen when creating a blog """ htmlStr = '' + # the css filename + cssFilename = baseDir + '/epicyon-profile.css' + if os.path.isfile(baseDir + '/epicyon.css'): + cssFilename = baseDir + '/epicyon.css' + + profileStyle = getCSS(baseDir, cssFilename, cssCache) + if profileStyle: + # replace any https within the css with whatever prefix is needed + if httpPrefix != 'https': + profileStyle = \ + profileStyle.replace('https://', httpPrefix + '://') + + # iconsDir = getIconsDir(baseDir) + + htmlStr = htmlHeader(cssFilename, profileStyle) + # top banner bannerFile, bannerFilename = getBannerFile(baseDir, nickname, domain) htmlStr += \ - '\n' + '\n' htmlStr += '\n' - # TODO add submit button + # submit button + htmlStr += \ + '
\n' + htmlStr += \ + '
\n' + \ + ' \n' + \ + '
\n' - for dateStr, item in newswire.items(): - publishedDate = \ - datetime.strptime(dateStr, "%Y-%m-%d %H:%M:%S%z") - dateShown = publishedDate.strftime("%Y-%m-%d %H:%M") + # list of newswire items + if newswire: + for dateStr, item in newswire.items(): + publishedDate = \ + datetime.strptime(dateStr, "%Y-%m-%d %H:%M:%S%z") + dateShown = publishedDate.strftime("%Y-%m-%d %H:%M") - title = removeLongWords(item[0], 16, []).replace('\n', '
') - link = item[1] + title = removeLongWords(item[0], 16, []).replace('\n', '
') + link = item[1] - # TODO add checkbox - htmlStr += '

' + \ - '' + \ - title + '' - htmlStr += ' ' - htmlStr += dateShown + '

\n' + htmlStr += \ + '' + \ + '' + title + ' ' + htmlStr += '' + \ + dateShown + '

' + htmlStr += '
\n' - return htmlStr + htmlStr += '
\n' + return htmlStr + htmlFooter() def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,