package web import "git.zb-server.de/ZB-Server/uptimesebi/internal/i18n" // Page carries what every rendered page needs besides its own content. type Page struct { TitleID string CSRF string Languages []string } templ Layout(p Page) { if p.CSRF != "" { } { i18n.T(ctx, p.TitleID) } ยท uptimesebi { children... } } templ languageSwitch(langs []string) { for _, l := range langs { if l == i18n.Lang(ctx) { { l } } else { } } } templ authShell(p Page) { @Layout(p) {

uptimesebi

@languageSwitch(p.Languages)

{ i18n.T(ctx, p.TitleID) }

{ children... }
} } templ field(label, name, typ, autocomplete string, required bool) { } templ submit(label string) { } templ formError() { }