Unfinished navigation bar remake

This commit is contained in:
Govindas 2022-01-25 16:05:07 +02:00
parent 95afcd1e1b
commit e7b7ee181b

View File

@ -9,10 +9,18 @@ import html
def generateNavigationBar(lines):
global navbar
navbar = E
rawhtml = False
htmlstring = ""
for id, line in enumerate(lines):
title, link = line.strip().split(";", 1)
navbar = navbar.li(HTML("<a href='" + link + "'>" + title + "</a>"))
#parse raw HTML
rawhtml, navbar, htmlstring = parseRawHTML(navbar, line, htmlstring, rawhtml, id, len(lines))
#parse markdown
if not rawhtml:
navbar = navbar.li(HTML(parseMarkdown(navbar, line)))
#title, link = line.strip().split(";", 1)
#navbar = navbar.li(HTML("<a href='" + link + "'>" + title + "</a>"))
def parseRawHTML(doc, line, htmlstring, rawhtml, id, maxlines):
#raw html start