pager

package
v0.0.0-...-8577a5a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const PageSize = 25

Variables

View Source
var Component = render.Component{
	Template: "components/pager/pager.html",
	Functions: template.FuncMap{
		"numPages": func(max int) int {
			return int(math.Ceil(float64(max) / PageSize))
		},

		"PageSize": func() int { return PageSize },

		"dec": func(i int) int { return i - 1 },
		"inc": func(i int) int { return i + 1 },
	},
}

Functions

func Page

func Page(r *render.Request) (int, error)

Page returns a 1-indexed page count parsed from "p".

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL