Next/Prev stuff

This commit is contained in:
Simon Martens
2025-03-30 18:12:52 +02:00
parent 316e8e3f58
commit 0e2c6360bf
25 changed files with 355 additions and 67 deletions

View File

@@ -19,9 +19,10 @@ func GetLetter(c *fiber.Ctx) error {
if meta == nil {
return c.SendStatus(fiber.StatusNotFound)
}
np := lib.NextPrev(meta)
text := lib.Letters.Item(letter)
tradition := lib.Traditions.Item(letter)
return c.Render("/brief/", map[string]any{"meta": meta, "text": text, "tradition": tradition})
return c.Render("/brief/", map[string]any{"meta": meta, "text": text, "tradition": tradition, "next": np.Next, "prev": np.Prev})
}