// SPDX-License-Identifier: AGPL-3.0-or-later package web // Commits is the history of a ref, or of a path at a ref: the commits of the // page grouped by day, and the way to the older ones. templ Commits(l Layout, p CommitsPage) { @Shell(l, commitsRail(p)) {
if p.Path != "" {

history of { p.Path } at { p.Ref }

} if p.Live { @LiveSlot("commits-head") }
for _, g := range p.Days {

{ g.Day }

@CommitRows(g.Rows)
}
if len(p.Days) == 0 {

no commits.

} if p.Older != "" || p.Newest != "" { } } } templ commitsRail(p CommitsPage) {

History

ref
{ p.Ref }
on page
{ itoa(p.Count) }
if p.Path != "" {
path
{ p.Path }
} if p.Open != nil {
file
{ p.Open.Label }
}

Refs on this page

if len(p.Refs) > 0 { } else {

no tag or branch head here

}
}