Index functions

This commit is contained in:
Simon Martens
2025-03-26 16:18:53 +01:00
parent dd24aea0a3
commit 052f21e87a
10 changed files with 240 additions and 23 deletions

View File

@@ -8,6 +8,9 @@ import (
const DEFAULT_YEAR = 1765
func GetIndex(fiber *fiber.Ctx) error {
_ = xmlmodels.Get()
return fiber.Render("/", nil)
lib := xmlmodels.Get()
// Years
years, yearmap := lib.Years()
return fiber.Render("/", map[string]any{"years": years, "yearmap": yearmap})
}