diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2026-02-04 17:04:55 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2026-02-04 17:07:39 +0100 |
| commit | 82ad3593a4735055d9b362ab94bc4a9e4f20e4a4 (patch) | |
| tree | 89c1dd77aaa863c7369d762ab8e9f7aba63272b9 /backend/section.go | |
| parent | 2cab73140e45e1788af7810ddecbb251548d3fe6 (diff) | |
feat(frontend): smaller list display instead of bigger one
Diffstat (limited to 'backend/section.go')
| -rw-r--r-- | backend/section.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/backend/section.go b/backend/section.go index 9d49ea2..376f562 100644 --- a/backend/section.go +++ b/backend/section.go @@ -43,6 +43,7 @@ type sectionData struct { DataTitle string Content template.HTML Slug string + URI string } func (d *sectionData) SetData(dt *data) { @@ -163,7 +164,7 @@ func (s *Section) Handle(r *chi.Mux) { } func (s *Section) handleList(w http.ResponseWriter, r *http.Request) { - p := s.handlePagination(w, r, 5) + p := s.handlePagination(w, r, 7) if p == nil { return } @@ -214,6 +215,7 @@ func (s *Section) parse(d *sectionData, mu *sync.Mutex, path, slug string) bool d.Article = true d.DataTitle = slug d.Slug = slug + d.URI = s.URI b, err := os.ReadFile(path + ".md") if err != nil { if os.IsNotExist(err) { |
