Skip to main content

Module html

Module html 

Source
Expand description

Server-rendered HTML views — zero framework, inline CSS, every interpolation passed through crate::request::esc.

There is no templating engine and no client-side JS in the rendered markup: the forge is server-rendered by construction, and the XSS spine is content-type + esc() (see crate::request).

Functions§

blob_page
A blob (file) view. content is Some(text) for a textual blob or None for a binary one (a download link is shown instead).
commit_page
Single-commit view: metadata + the unified-diff patch in a <pre>.
commits_page
Paginated commit log view.
crumbs
Render a breadcrumb nav bar from (label, href) pairs. The last entry is rendered as plain (non-link) text.
index_page
The global landing page listing (owner, repo) pairs. Each row links to the repo overview. An empty list renders an explanatory note.
issue_detail_page
A single issue thread view: title/state header plus each re-fetched body. truncated warns when the thread exceeded the read cap.
issue_new_page
The new-issue form. The body document is PUT to the author’s pod by the client first; this form submits the resulting resourceUrl pointer plus a title. (Podless agents submit the body inline — Tier 2.5.) Server-rendered, no script.
issues_list_page
The issues list, with an open/closed filter and a “new issue” link.
owner_page
A single owner’s repo list.
page
Wrap body_html in a full HTML document with a shared header and the inline stylesheet. title is escaped; body_html must already be composed of esc()’d values.
refs_page
A ref list (branches or tags). link_verb is "commits" for branches (link to the branch log) or "tree" for tags.
repo_overview_page
Repo overview: header, root tree at rev, and an optional README.
tree_page
A subdirectory listing view.