forked from indymedia/epicyon
External css on timeline
parent
7760816ec1
commit
6939c82302
1190
webapp_timeline.py
1190
webapp_timeline.py
File diff suppressed because it is too large
Load Diff
|
@ -437,6 +437,26 @@ def htmlHeader(cssFilename: str, css: str, lang='en') -> str:
|
||||||
return htmlStr
|
return htmlStr
|
||||||
|
|
||||||
|
|
||||||
|
def htmlHeaderWithExternalStyle(cssFilename: str, css: str, lang='en') -> str:
|
||||||
|
htmlStr = '<!DOCTYPE html>\n'
|
||||||
|
htmlStr += '<html lang="' + lang + '">\n'
|
||||||
|
htmlStr += ' <head>\n'
|
||||||
|
htmlStr += ' <meta charset="utf-8">\n'
|
||||||
|
fontName, fontFormat = getFontFromCss(css)
|
||||||
|
if fontName:
|
||||||
|
htmlStr += ' <link rel="preload" as="font" type="' + \
|
||||||
|
fontFormat + '" href="' + fontName + '" crossorigin>\n'
|
||||||
|
htmlStr += ' <style>\n' + css + '</style>\n'
|
||||||
|
cssFile = cssFilename.split('/')[-1]
|
||||||
|
htmlStr += ' <link rel="stylesheet" href="' + cssFile + '">'
|
||||||
|
htmlStr += ' <link rel="manifest" href="/manifest.json">\n'
|
||||||
|
htmlStr += ' <meta name="theme-color" content="grey">\n'
|
||||||
|
htmlStr += ' <title>Epicyon</title>\n'
|
||||||
|
htmlStr += ' </head>\n'
|
||||||
|
htmlStr += ' <body>\n'
|
||||||
|
return htmlStr
|
||||||
|
|
||||||
|
|
||||||
def htmlFooter() -> str:
|
def htmlFooter() -> str:
|
||||||
htmlStr = ' </body>\n'
|
htmlStr = ' </body>\n'
|
||||||
htmlStr += '</html>\n'
|
htmlStr += '</html>\n'
|
||||||
|
|
Loading…
Reference in New Issue