Unfinished navigation bar remake
This commit is contained in:
parent
95afcd1e1b
commit
e7b7ee181b
12
generate.py
12
generate.py
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user