Made it look a bit nicer and added a cascading menu thing

This commit is contained in:
2025-10-17 17:48:37 +01:00
parent 5d51b7ecfa
commit c07c24e86f
13 changed files with 114 additions and 29 deletions

View File

@@ -3,3 +3,24 @@ import hashlib
def sha512_hash(Password):
HashedPassword = hashlib.sha512(Password.encode('utf-8')).hexdigest()
return HashedPassword
def dropdown_menu(object_input):
html = ''
def loop(x, count):
html = ''
for key,value in x.items():
print(' ' * count * 5, key)
if type(value) == dict:
html += f'<details style="left: {count * 5}px; position: relative">'
html += f'<summary>{key}</summary>'
html += loop(x[key], count+1)
html += f'</details>'
else:
html += f'<a href="/wiki/{value}" style="left: {count * 5}px; position: relative">{key}</a><br/>'
return html
count = 0
html += loop(object_input, count)
print(html)
return html