diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-02 22:54:46 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-02 22:54:46 +0200 |
| commit | 0bcfe1f7df5c309f8a4ab381a6fd5b772d929542 (patch) | |
| tree | 398c348d37c1f0e8d48c58b7bc7abb34fa3b1763 /backend/data.go | |
| parent | 6044dd841c81f0f4d206c6c8800b0fd30320cf13 (diff) | |
feat(backend): working pagination
Diffstat (limited to 'backend/data.go')
| -rw-r--r-- | backend/data.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/backend/data.go b/backend/data.go index f3e8b42..9c30c6b 100644 --- a/backend/data.go +++ b/backend/data.go @@ -64,6 +64,8 @@ func (d *data) handleGeneric(w http.ResponseWriter, r *http.Request, name string } return fmt.Sprintf("/assets/%s", path) }, + "next": func(i int) int { return i + 1 }, + "before": func(i int) int { return i - 1 }, }).ParseFS(templates, fmt.Sprintf("templates/%s.html", name), "templates/base.html") if err != nil { panic(err) |
