Skip to content

Commit

Permalink
Sort by shape name asc, date desc
Browse files Browse the repository at this point in the history
  • Loading branch information
opcode81 committed Jun 25, 2024
1 parent 0c22927 commit da61eb9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/web_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ def _load_svg_variations(self) -> Dict[str, Dict[str, list[str]]]:
shape_name = rel_dir.split("/")[0]
sub_dir = rel_dir[len(shape_name) + 1:]
html_files[shape_name][sub_dir].append(file)
return html_files
sorted_html_files = {}
for key, value in sorted(html_files.items()):
sorted_html_files[key] = dict(sorted(value.items(), reverse=True))
return sorted_html_files

async def index(self, request: Request) -> HTMLResponse:
html_files = self._load_svg_variations()
Expand Down

0 comments on commit da61eb9

Please sign in to comment.