Sort the gallery alphabetically
This commit is contained in:
parent
83368875eb
commit
a08802bf70
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ def generate_html():
|
||||||
container_html = f'<style>{css}</style><div class="character-gallery">'
|
container_html = f'<style>{css}</style><div class="character-gallery">'
|
||||||
|
|
||||||
# Iterate through files in image folder
|
# Iterate through files in image folder
|
||||||
for file in Path("characters").glob("*"):
|
for file in sorted(Path("characters").glob("*")):
|
||||||
if file.name.endswith(".json"):
|
if file.name.endswith(".json"):
|
||||||
character = file.name.replace(".json", "")
|
character = file.name.replace(".json", "")
|
||||||
container_html += f'<div class="character-container" onclick=\'document.getElementById("character-menu").children[1].children[1].value = "{character}"; document.getElementById("character-menu").children[1].children[1].dispatchEvent(new Event("change"));\'>'
|
container_html += f'<div class="character-container" onclick=\'document.getElementById("character-menu").children[1].children[1].value = "{character}"; document.getElementById("character-menu").children[1].children[1].dispatchEvent(new Event("change"));\'>'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue