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):
|
def generateNavigationBar(lines):
|
||||||
global navbar
|
global navbar
|
||||||
navbar = E
|
navbar = E
|
||||||
|
rawhtml = False
|
||||||
|
htmlstring = ""
|
||||||
for id, line in enumerate(lines):
|
for id, line in enumerate(lines):
|
||||||
|
|
||||||
title, link = line.strip().split(";", 1)
|
#parse raw HTML
|
||||||
navbar = navbar.li(HTML("<a href='" + link + "'>" + title + "</a>"))
|
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):
|
def parseRawHTML(doc, line, htmlstring, rawhtml, id, maxlines):
|
||||||
#raw html start
|
#raw html start
|
||||||
|
Loading…
Reference in New Issue
Block a user