// 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 } if l.Lazy { } if l.MR { } if l.IssueForm { } @Header(l)
if l.Lede != "" {

{ l.Lede }

}
{ children... }
if l.HasRail && rail != nil { }
@Footer(l) @Hint(l) if SignedIn(ctx) { } @OverlayHelp(l.MR) @OverlayRefs(l) @OverlayCmd(l.Cmd) @Keys() } // Header is the page header: the logo (home), the path, the ref switcher, // the "go to" palette and the owner; inside a repository, the tabs below. templ Header(l Layout) {
if l.Inbox != nil { Inbox if l.Inbox.Count >= 0 { { itoa(l.Inbox.Count) } } } if len(l.Crumbs) > 0 { }
if l.Ref != "" { { l.Ref } { l.Short } } if SignedIn(ctx) {
{ l.Owner } if l.Passkeys { }
} else if l.Passkeys { }
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, then the // keyboard shortcuts and the theme switch (auto, light, dark; ermite.js shows // the stored mode). 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)
}