added the Policy page

This commit is contained in:
2026-03-04 22:18:57 -07:00
parent 50b5ef71b1
commit 137536923d
9 changed files with 162 additions and 1 deletions
+19
View File
@@ -245,6 +245,25 @@ func AboutPage(ctxt ui.AmContext) (string, any) {
return "framed", "about.jet"
}
/* PolicyPage renders the policy page.
* Parameters:
* ctxt - The AmContext for the request.
* Returns:
* Command string dictating what to be rendered.
* Data as a parameter for the command string.
*/
func PolicyPage(ctxt ui.AmContext) (string, any) {
title, body, err := ui.AmLoadHTMLResource(config.GlobalConfig.Site.PolicyResource)
if err != nil {
return "error", err
}
ctxt.VarMap().Set("title", title)
ctxt.VarMap().Set("body", body)
ctxt.SetFrameTitle(title)
return "framed", "policy.jet"
}
/* JumpToShortcut resolves "/go" links by redirecting them to the appropriate page.
* Parameters:
* ctxt - The AmContext for the request.