Fix dropdown with no link being clickable, was breaking mobile support & edit README.md

This commit is contained in:
Govindas 2022-09-14 13:02:01 +03:00
parent df3eafb29f
commit 0efdbbd8b4
2 changed files with 3 additions and 0 deletions

View File

@ -33,3 +33,4 @@ Note: folder name must be lowercase and spaces must be replaced with `-` charact
- Re-think footer (it works, but I'm unsure if it is flexible enough)
- Delete removed page files from website-output during next site generation (Last, to be done on release, so it doesn't disturb development)
- Maybe document styling? (div classes: 'content', 'dropdown', 'dropbtn', 'dropdown-content', etc.)
- Custom markdown for colors?

View File

@ -42,6 +42,8 @@ def generateNavigationBar(lines, pagetitle):
link = parseLink(link, pagetitle, homepage)
if link.strip() == "#":
dphtml = dphtml(HTML("<div class='dropdown'><div class='dropbutton'><div class='active'><a href='" + link.strip() + "'>" + title + "</a></div></div><div class='dropdown-content'>"))
elif link.strip() == "":
dphtml = dphtml(HTML("<div class='dropdown'><div class='dropbutton'><a>" + title + "</a></div><div class='dropdown-content'>"))
else:
dphtml = dphtml(HTML("<div class='dropdown'><div class='dropbutton'><a href='" + link.strip() + "'>" + title + "</a></div><div class='dropdown-content'>"))
continue