package pagination import "git.haelnorr.com/h/oslstats/internal/db" import "fmt" templ Pagination(opts db.PageOpts, total int) {
if total > 0 { Showing { fmt.Sprintf("%d", opts.StartItem()) } - { fmt.Sprintf("%d", opts.EndItem(total)) } of { fmt.Sprintf("%d", total) } results } else { No results }
if total > 0 && opts.TotalPages(total) > 1 {
for _, pageNum := range opts.GetPageRange(total, 7) { }
}
}