// SPDX-License-Identifier: AGPL-3.0-or-later package web // Facts is a key/value block on an 11ch key column. templ Facts(facts []Fact) {
for _, f := range facts {
{ f.Key }
@FactValue(f) }
} // CloneBlock is a block of copyable shell lines; each has its own [copy] // button, whose label says "copied" for 1.5 s. templ CloneBlock(c Clone) {
for _, line := range c.Lines {
{ line }
}
} // HomeRowView is the card of a repository in the home list. Its id is the // target of SSE swaps; the name link comes first, `enter` follows it. templ HomeRowView(r HomeRow) {
  • { r.Name } if r.Private { private } if r.Fresh { new push }

    if r.Desc != "" {

    { r.Desc }

    } else {

    no description

    }

    if r.Branch != "" { { r.Branch } } if r.PushedAt != "" { pushed } else { never pushed }

  • } // Outline is the README outline; levels indent by 2ch, the h1 is bold. templ Outline(headings []Heading) { } // ReadmeCard is a README in a card whose header names the file. templ ReadmeCard(r Readme) {

    { r.Name }

    @ReadmeView(r)
    } // ReadmeView is a rendered README. Its HTML comes from the Markdown // renderer, which drops raw HTML and filters URLs. templ ReadmeView(r Readme) {
    if r.Note != "" {

    { r.Note }

    } else { @templ.Raw(r.HTML) }
    } // CommitRows is a cursor table of commits: sha, subject with inline refs, // author, relative date (absolute in the title). templ CommitRows(rows []CommitRow) { for _, c := range rows { }
    { c.Short } { c.Subject } if c.Merge { merge } for _, b := range c.Branches { { b } } for _, t := range c.Tags { tag { t } } @CommitChecks(c.Checks) { c.Author }
    }