content,internal/frontend: display range for search results
Search results are currently indicated as "<start> of <total>" (such as
"0 of 95").
They are now displayed as <start>-<end> of <total> (such as "1-10 of
95").
Fixes b/131929222
Updates b/131908602
@@ -110,10 +110,9 @@ func parsePageTemplates(base string) (map[string]*template.Template, error) {
for _, set := range htmlSets {
templateName := set[0]
t, err := template.New("base.tmpl").Funcs(template.FuncMap{
+ "add": func(i, j int) int { return i + j },
+ "curYear": func() int { return time.Now().Year() },
"templateName": func() string { return templateName },
- "curYear": func() int {
- return time.Now().Year()
- },
}).ParseFiles(filepath.Join(base, "base.tmpl"))
if err != nil {
return nil, fmt.Errorf("ParseFiles: %v", err)
