// SPDX-License-Identifier: AGPL-3.0-or-later package web // Shell is the page: head, the header, the work area (content and rail), the // footer, the hint badge, the overlays and the key map. The content is the // children. templ Shell(l Layout, rail templ.Component) { { l.Title } @Header(l)
if l.Lede != "" {

{ l.Lede }

}
{ children... }
if l.HasRail && rail != nil { }
@Footer(l) @Hint(l) @OverlayHelp() @OverlayRefs(l) @OverlayCmd(l.Cmd) @Keys() } // Header is the page header: the instance, the path, the ref switcher, the // "go to" palette and the owner; inside a repository, the tabs below. templ Header(l Layout) {
{ l.Instance } if len(l.Crumbs) > 0 { }
if l.Ref != "" { } if SignedIn(ctx) {
owner
}
if len(l.Sections) > 0 { }
} // Footer is the version and the link to the source of the running version, // which the AGPL §13 asks every user of the service to be offered. templ Footer(l Layout) { } // Hint is the floating badge at the bottom right. It shows only what the // keyboard just did or what needs attention: the row position while j/k // move, the selected lines of a file, a flash message (permalink copied) and // a lost event stream. Empty, it takes no room. templ Hint(l Layout) {
@Live(l)
}