SiteRenderer Class

#include <site_renderer.h>

Public Types

struct DocShell
struct HomeSection
struct PageTab

Public Functions

SiteRenderer()
~SiteRenderer()
bool init(const std::string & framework_dir, const std::string & pages_dir, const std::string & site_images_dir, const std::string & output_web_root, const std::string & default_theme)
void set_site(const int & site)
std::string titlebar_html(const PageTab & tab)
const std::string & footer_html()
const std::string & settings_html()
std::string home_html(const int & sections)
std::string project_page_html(const int & project, const std::string & body_html, const std::string & top_html, const std::string & bottom_html)
std::string family_page_html(const int & project, const std::string & body_html)
std::string content_page_html(const std::string & body_html, const std::string & sidebar_html)
std::string docs_index_html(const int & project)
std::string versions_page_html(const int & project)
DocShell doc_page_shell(const int & project, const int & version)
std::string icon_name_for(const std::string & url)
std::string stylesheet()
std::string theme_manifest()
const std::string & default_theme()

Detailed Description

No description available.

Member Function Documentation

SiteRenderer()

No description available.

~SiteRenderer()

No description available.

bool init(const std::string & framework_dir, const std::string & pages_dir, const std::string & site_images_dir, const std::string & output_web_root, const std::string & default_theme)

Load the framework styles/themes (framework_dir = the Universal Vortex repo root) plus the page styles (pages_dir = templates/site/pages), then install the provenance sentinel so theme-linked values emit as CSS variables. site_images_dir (templates/site/framework/images) joins the icon search path so site-shipped mono glyphs (arrow, projects, …) inline

  • recolor like framework icons. default_theme is the site's default palette (display id); an unknown id falls back like the framework's init. Returns false when the assets fail to load. output_web_root is the built site's root directory: a themeable SVG logo bound to an Image resolves its root-absolute Source ("/images/x.svg") against it, so SITE-shipped logos (copied under the output /images by the time pages emit) inline + recolor, not just the framework's own /images.

void set_site(const int & site)

Feed the site config once per build: footer links + copyright, the nav dropdown card lists (top-level projects / socials), the home-section card pairs, and the brand tab (branding.logo_path / tab_text / logo_height). Emits the site-constant surfaces (footer, settings dialog) and pre-mints the titlebar's classes + responsive/open-state variant CSS from a representative composition.

std::string titlebar_html(const PageTab & tab)

The titlebar for one page: the optional left tab, the nav dropdown buttons (hidden when the site has no matching content), the brand tab and the settings gear. Emitted per page (the active tab is static). The returned fragment is the

const std::string & settings_html()

No description available.

std::string home_html(const int & sections)

Page scaffolds (S4). Every *_html argument is pre-rendered, root-absolute HTML spliced through a Host slot (empty = slot omitted); SiteEngine::write_output()'s relativizer makes the emitted URLs page-relative (and file://-safe) exactly like every templated URL. The home page composes its sections in order into one Host — see HomeSection.

std::string project_page_html(const int & project, const std::string & body_html, const std::string & top_html, const std::string & bottom_html)

No description available.

std::string family_page_html(const int & project, const std::string & body_html)

No description available.

std::string content_page_html(const std::string & body_html, const std::string & sidebar_html)

No description available.

std::string docs_index_html(const int & project)

No description available.

std::string versions_page_html(const int & project)

The versions page: one card per entry in project.versions (newest first) with its label, tag, release date and status, a link to the docs index with that version picked (docs/#<label>), a link to the repo's source at the tag (when the project has a repo and the version a tag), and the version's own downloads rows. For example, a versions entry looks like:

{ "label": "3.0", "tag": "3.0.2", "release_date": "2026-10-28", "status": "latest", "downloads": [ { "url": "/downloads/app/app-3.0.1-linux.AppImage", "version": "3.0.1", "platform_label": "Linux", "size": "52 MB" } ] }

DocShell doc_page_shell(const int & project, const int & version)

No description available.

std::string icon_name_for(const std::string & url)

Map a site image URL ("/images/projects.svg") to a recolorable icon name ("projects") when the file ships with the templates' framework images; "" means the URL is site-owned media (render as ).

std::string stylesheet()

The shared stylesheet: the emitted class rules for every surface rendered so far, the responsive/open-state variant blocks, and the per-theme :root variable blocks (default theme bare on :root — the no-JS palette).

std::string theme_manifest()

The loaded themes as JSON (id/name/publisher/palette per entry) — the switcher UI's data, inlined into pages as window.UV_THEMES.

const std::string & default_theme()

The resolved default theme's display id (post-fallback).

Appearance
Theme
—