// SPDX-License-Identifier: AGPL-3.0-or-later
package web
import "fmt"
// Home is the repository list.
templ Home(l Layout, p HomePage) {
@Shell(l, nil) {
Repositories
for _, r := range p.Rows {
@HomeRowView(r)
}
if len(p.Rows) == 0 {
no repositories yet.
}
}
}
// Summary is the summary of a repository: the README reads in the main
// column at the reading measure; what one acts on sits in the rail.
templ Summary(l Layout, p SummaryPage) {
@Shell(l, summaryRail(p)) {
if p.Readme != nil {
@ReadmeCard(*p.Readme, p.Docs...)
}
}
}
// latestTagFact is the "latest tag" row of About: the newest tag (its
// commit subject on hover), how old it is, and the count of tags, a link to
// all of them. With too many tags to date them, the count only.
templ latestTagFact(t LatestTag) {
}
}
// Login signs the browser in with a login link. Opening the link consumes
// nothing; only this form does. ermite.js submits it as soon as a browser
// shows the page (data-autosubmit): link previews and prefetchers run no
// script, so they still cannot use the link. Without scripts the owner
// clicks the button.
templ Login(l Layout, p LoginPage) {
@Shell(l, nil) {
}
}
// PasskeyLogin is the sign-in page: a button the script (passkey.js) drives.
// Without script the button is hidden and the page says what to do instead.
templ PasskeyLogin(l Layout, p PasskeyLoginPage) {
@Shell(l, nil) {