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/templates | |
| parent | 6044dd841c81f0f4d206c6c8800b0fd30320cf13 (diff) | |
feat(backend): working pagination
Diffstat (limited to 'backend/templates')
| -rw-r--r-- | backend/templates/home.html | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/backend/templates/home.html b/backend/templates/home.html index f0b9b9c..37236ba 100644 --- a/backend/templates/home.html +++ b/backend/templates/home.html @@ -18,10 +18,12 @@ </p> </article> {{ end }} + {{ if ne .PagesNumber 1 }} <div class="pagination"> - <a href="">Précédent</a> - <p>01/15</p> - <a href="">Suivant</a> + {{ if ne .CurrentPage 1 }}<a href="?page={{ before .CurrentPage }}">Précédent</a>{{else}}<p></p>{{end}} + <p>{{ .CurrentPage }}/{{ .PagesNumber }}</p> + {{ if ne .CurrentPage .PagesNumber }}<a href="?page={{ next .CurrentPage }}">Suivant</a>{{else}}<p></p>{{end}} </div> + {{ end }} </article> {{end}}
\ No newline at end of file |
