// 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 {
}
skip to content
@Header(l)
if l.Lede != "" {
{ l.Lede }
}
{ children... }
if l.HasRail && rail != nil {
}
@Footer(l)
@Hint(l)
if SignedIn(ctx) {
Inbox
}
@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.Ref != "" {
{ l.Ref }{ l.Short }
}
if SignedIn(ctx) {
} 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) {