package html import "fmt" import "github.com/dustin/go-humanize" import "go.jolheiser.com/ugit/internal/git" type RepoLogContext struct { BaseContext RepoHeaderComponentContext Commits []git.Commit } templ RepoLog(rlc RepoLogContext) { @base(rlc.BaseContext) { @repoHeaderComponent(rlc.RepoHeaderComponentContext)
for _, commit := range rlc.Commits {
{ commit.Short() }
if commit.Signature != "" {
Signature
{ commit.Signature }
}
if commit.Details() != "" {
{ commit.Summary() }
{ commit.Details() }
} else { { commit.Message } }
{ commit.Author }{ " " }{ fmt.Sprintf("<%s>", commit.Email) }
{ humanize.Time(commit.When) }
}
} }