Tweak html header

alt-html-css
Admin 2020-11-12 09:55:01 +00:00
parent c6032377ba
commit c3554124fa
1 changed files with 9 additions and 4 deletions

View File

@ -515,10 +515,10 @@ def getLeftImageFile(baseDir: str,
def getRightImageFile(baseDir: str,
nickname: str, domain: str, theme: str) -> (str, str):
return _getImageFile(baseDir, 'right_col_image',
baseDir + '/accounts/' + nickname + '@' + domain,
nickname, domain, theme)
nickname: str, domain: str) -> (str, str):
return getImageFile(baseDir, 'right_col_image',
baseDir + '/accounts/' + nickname + '@' + domain,
nickname, domain)
def htmlHeaderWithExternalStyle(cssFilename: str, lang='en') -> str:
@ -526,6 +526,11 @@ def htmlHeaderWithExternalStyle(cssFilename: str, lang='en') -> str:
htmlStr += '<html lang="' + lang + '">\n'
htmlStr += ' <head>\n'
htmlStr += ' <meta charset="utf-8">\n'
htmlStr += ' <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">\n'
fontName, fontFormat = getFontFromCss(css)
if fontName:
htmlStr += ' <link rel="preload" as="font" type="' + \
fontFormat + '" href="' + fontName + '" crossorigin>\n'
cssFile = '/' + cssFilename.split('/')[-1]
htmlStr += ' <link rel="stylesheet" href="' + cssFile + '">\n'
htmlStr += ' <link rel="manifest" href="/manifest.json">\n'