Documentation
¶
Overview ¶
Package html renders the kage-shape static site from stored records: an inert, self-contained set of pages that look like X and open with the network unplugged (spec §9). No <script>, no on* handlers, no remote fonts — a photograph, not a program. Templates are embedded so the binary needs no asset directory at runtime, and html/template auto-escapes every value.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer holds the shared context for one repository's pages. It is single-use per render pass and not safe for concurrent pages (it sets the per-page FromPage on the shared context before each build).
func New ¶
func New(tweets []*x.Tweet, assets []repo.Asset, profile *x.User, footer, navTitle string) *Renderer
New builds a renderer over a record set, the localised media, and the profile. footer is the page footer line (carrying the --date capture stamp); navTitle is the repository's display name shown in the top nav.
func (*Renderer) Index ¶
Index renders the repository home at index.html: the profile header (when a profile was captured) followed by a reverse-chronological list of the captured threads and standalone tweets, each linking to its page. heading/subheading label a non-profile capture (a search or a list).
func (*Renderer) ThreadPage ¶
ThreadPage renders a reconstructed conversation at threads/<root>.html.