package web import ( "git.zb-server.de/ZB-Server/uptimesebi/internal/agentapi" "git.zb-server.de/ZB-Server/uptimesebi/internal/i18n" ) templ legalLink(l LegalLink) { if l.External { { i18n.T(ctx, LegalTitleID(l.Kind)) } } else { { i18n.T(ctx, LegalTitleID(l.Kind)) } } } templ legalFooter(links []LegalLink) { if len(links) > 0 { } } templ legalBody(html string) { } // LegalPage shows a platform legal document. templ LegalPage(p Page, html string) { @Layout(p) {

uptimesebi

@legalBody(html)
} } // PublicLegalPage shows a legal document of a status page. templ PublicLegalPage(s agentapi.PageSnapshot, a PublicAssets, kind, html, back string) { { i18n.T(ctx, LegalTitleID(kind)) } · { s.Title }

{ "← " + s.Title }

@legalBody(html)
} // LegalForm is the stored state of one legal document. type LegalForm struct { Kind string URL string Markdown string } // LegalSettingsPage edits legal documents. apiBase plus the kind is the // endpoint each form saves to. templ LegalSettingsPage(p Page, me Me, titleID, introID, apiBase, next string, docs []LegalForm) { @consoleShell(p, me) { @settingsHeading(titleID, introID) for _, d := range docs {
@sectionHeading(LegalTitleID(d.Kind))
@formError()

{ i18n.T(ctx, "legal.hint") }

@submit(i18n.T(ctx, "common.save"))
} } }