Skip to content

Parts

module Parts
AssemblyNacara.Theme.Default
Attributes[<RequireQualifiedAccess>]

How the default theme renders each part of a page.

Exposed one by one, so a site can replace one of them with parts and keep the rest, or wrap one to add to it.

Functions and values

article (context: PartContext) (slots: ArticleSlots) : ReactElement

The <main>: a translation notice, the title, the content, the edit link and the previous and next links.

Parameter
contextThe page being rendered, and what it asked for.
slotsThe content and what follows it, rendered already.
defaults: ThemeParts

Every part, as the theme renders it.

editLink (PartContext) (model: EditLinkModel) : ReactElement

Link back to the source of the page in its repository.

footer (context: PartContext) : ReactElement

What every page ends with: the footer the site gave, or nothing.

frame (context: PartContext) (slots: FrameSlots) : ReactElement

The navbar, then the sidebar, the content and the table of contents side by side, then the footer.

Parameter
contextThe page being rendered, and what it asked for.
slotsThe pieces, rendered already.
head (PartContext) (model: HeadModel) : ReactElement list

The tags of the head, as meta writes them.

navbar (PartContext) (model: NavbarModel) : ReactElement

The bar across the top: brand, sections, and whatever sits at its end.

pageNav (PartContext) (model: PageNavModel) : ReactElement

Previous and next links, following the order of the sidebar.

sidebar (PartContext) (model: SidebarModel) : ReactElement

The sidebar: the navbar's sections for a narrow screen, the filter box, and the section's menu.

toc (PartContext) (model: TocModel) : ReactElement

The headings of this page, in the right-hand column.