{% import "git.gabrielgio.me/cerrado/pkg/service" %} {% import "context" %} {% import "strings" %} {% code type GitListPage struct { Respositories []*service.Repository About []byte } %} {% code func firstLine(text string) string { lines := strings.Split(text, "\n") if len(lines) > 0 { return lines[0] } return "" } %} {% func (p *GitListPage) Title(ctx context.Context) %}Git | List{% endfunc %} {% func (p *GitListPage) Navbar(ctx context.Context) %}{%= Navbar(ctx, Git) %}{% endfunc %} {% func (p *GitListPage) Content(ctx context.Context) %}
{%s r.Description %}
{%s r.LastCommit.Hash.String()[0:8] %} - {%s r.LastCommit.Author.Name %} - {%s firstLine(r.LastCommit.Message) %}