all repos

mugit @ 1731de895cafca2ca5b33704fb320f965a58d8bb

🐮 git server that your cow will love
3 files changed, 3 insertions(+), 5 deletions(-)
better function name
Author: Oleksandr Smirnov olexsmir@gmail.com
Committed at: 2026-01-28 18:40:04 +0200
Change ID: orznlzsoolwnupqxwmoltytrvtvmwwrm
Parent: 7b26905
M internal/handlers/handlers.go

@@ -48,6 +48,7 @@ http.ServeFileFS(w, r, web.StaticFS, f)

} var templateFuncs = template.FuncMap{ + "humanizeTime": func(t time.Time) string { return humanize.Time(t) }, "commitSummary": func(v any) string { s := fmt.Sprint(v) if i := strings.IndexByte(s, '\n'); i >= 0 {

@@ -55,8 +56,5 @@ s = strings.TrimSuffix(s[:i], "\r")

return s + "..." } return strings.TrimSuffix(s, "\r") - }, - "humanTime": func(t time.Time) string { - return humanize.Time(t) }, }
M web/templates/index.html

@@ -24,7 +24,7 @@ {{ range .repos }}

<tr> <td class="url"><a href="/{{ .Name }}">{{ .Name }}</a></td> <td class="desc">{{ .Desc }}</td> - <td class="idle">{{ humanTime .LastCommit }}</td> + <td class="idle">{{ humanizeTime .LastCommit }}</td> </tr> {{ end}} </tbody>
M web/templates/repo_log.html

@@ -32,7 +32,7 @@ <strong>{{ .Author.Name }}</strong><br>

<a href="mailto:{{ .Author.Email }}" class="commit-email">{{ .Author.Email }}</a> </span> </td> - <td class="age">{{ humanTime .Committer.When }}</td> + <td class="age">{{ humanizeTime .Committer.When }}</td> </tr> {{ end }} </tbody>