Commit graph

3 commits

Author SHA1 Message Date
1b4a934398 auth: Split off vote data from the user
Now that the application is going to have multiple pages, vote data makes no sense
to keep with the user.
The user struct will be used everywhere to check for authentication, which is not
the case for previous votes.

Create a new struct and function in src/vote.rs to retrieve existing votes and
use them in places where user.votes was used previously.
Remove vote-related code from src/auth.rs and the week number dependence that it
required.
2024-07-28 16:55:22 +01:00
b1f37a4e4a templates: Make the index a class
The index is a full HTML page with some boilerplate that would be needed in all
pages deviating from the truth list, specifically the head and general structure.

Make the core structure a base template, rebuild the week index page inheriting
from it.
Change which template is used by the route accordingly.
2024-07-28 16:55:18 +01:00
afdac98dea templates: Move week-related includes to a folder
In preparation to adding a new page, move the week-related included files in a specific
sub-folder.
Change includes accordingly.
2024-07-27 22:41:06 +01:00