render

package
v0.0.55 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

templ: version: v0.3.865

templ: version: v0.3.865

templ: version: v0.3.865

templ: version: v0.3.865

templ: version: v0.3.865

templ: version: v0.3.865

templ: version: v0.3.865

templ: version: v0.3.865

templ: version: v0.3.865

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssetHref added in v0.0.54

func AssetHref(assetBaseURL, href string) string

AssetHref resolves a relative asset reference against the configured hosted docs root. When no hosted docs root is configured, the original relative asset path is preserved.

func BootstrapHydrationScript

func BootstrapHydrationScript(assetMode string, assetBaseURL string, sharedDataBase string, pageDataBase string) templ.Component

func BootstrapSharedNavCacheScript added in v0.0.55

func BootstrapSharedNavCacheScript(assetBaseURL string, sharedDataBase string, sharedDataHash string) templ.Component
func Breadcrumb(baseURL string, items []BreadcrumbItem) templ.Component

func BuildTagParentMap

func BuildTagParentMap(tags []*ppmodel.NavTag) map[string]*ppmodel.NavTag

BuildTagParentMap walks the NavTag tree once and returns a map from tag name to parent NavTag.

func CommonHeadersSection

func CommonHeadersSection(headers []*ppmodel.HeaderInfo, headersJSON string, baseURL string) templ.Component

func DocHref added in v0.0.55

func DocHref(baseURL, href string) string

DocHref resolves a document link against the configured hosted docs root. Portable pages preserve the original relative href so the page's <base href> continues to handle nested file:// navigation correctly.

func GraphJSONScript

func GraphJSONScript(graphJSON string) templ.Component
func Head(title string, baseURL string, assetBaseURL string, extraCSS []string, lite bool) templ.Component

func InlineExamples

func InlineExamples(mt *ppmodel.MediaTypeInfo) templ.Component

func Layout

func Layout(pageTitle string, siteTitle string, baseURL string, assetBaseURL string, activeSlug string, specFormat string, assetMode string, sharedDataBase string, pageDataBase string, vizGraphDataBase string, vizDiagramDataBase string, extraCSS []string, lite bool, content templ.Component) templ.Component

func LayoutPage added in v0.0.55

func LayoutPage(params LayoutPageParams, content templ.Component) templ.Component

LayoutPage renders the shared printing press shell with optional aggregate header context.

func MermaidDiagramScript

func MermaidDiagramScript(diagram string) templ.Component

func ModelPageTempl

func ModelPageTempl(page *ppmodel.ModelPage, baseURL string) templ.Component

func ModelTypeIndexTempl

func ModelTypeIndexTempl(group *ppmodel.NavModelGroup, breadcrumb []BreadcrumbItem, baseURL string) templ.Component

func ModelsIndexTempl

func ModelsIndexTempl(groups []*ppmodel.NavModelGroup, breadcrumb []BreadcrumbItem, baseURL string) templ.Component

func MustJSON

func MustJSON(v any) string
func NavTagItem(tag *ppmodel.NavTag, baseURL string) templ.Component
func NavTempl(tags []*ppmodel.NavTag, models map[string][]*ppmodel.ModelPage, baseURL string) templ.Component

func OperationPageTempl

func OperationPageTempl(page *ppmodel.OperationPage, baseURL string) templ.Component

func RequestBodySection

func RequestBodySection(rb *ppmodel.RequestBodyInfo, baseURL string) templ.Component

func RootOperationItem

func RootOperationItem(op *ppmodel.NavOperation, baseURL string) templ.Component

func RootPageTempl

func RootPageTempl(page *ppmodel.RootPage, baseURL string) templ.Component

func RootTagSection

func RootTagSection(tag *ppmodel.NavTag, depth int, baseURL string) templ.Component

func SecuritySchemeTypeBadge

func SecuritySchemeTypeBadge(sec *ppmodel.SecurityRequirement) templ.Component

func TagIndexTempl

func TagIndexTempl(tag *ppmodel.NavTag, breadcrumb []BreadcrumbItem, baseURL string) templ.Component

Types

type BreadcrumbItem struct {
	Label string
	Href  string
}

BreadcrumbItem represents a single breadcrumb navigation entry.

func ModelTypeIndexBreadcrumb

func ModelTypeIndexBreadcrumb(typeName string) []BreadcrumbItem

ModelTypeIndexBreadcrumb builds the breadcrumb for a model type index page.

func ModelsIndexBreadcrumb

func ModelsIndexBreadcrumb() []BreadcrumbItem

ModelsIndexBreadcrumb builds the breadcrumb for the models index page.

func TagIndexBreadcrumb

func TagIndexBreadcrumb(tag *ppmodel.NavTag, tagParentMap map[string]*ppmodel.NavTag) []BreadcrumbItem

TagIndexBreadcrumb builds the breadcrumb for a tag index page using a pre-computed parent map.

type LayoutPageParams added in v0.0.55

type LayoutPageParams struct {
	PageTitle          string
	SiteTitle          string
	BaseURL            string
	AssetBaseURL       string
	ActiveSlug         string
	SpecFormat         string
	AssetMode          string
	SharedDataBase     string
	SharedDataHash     string
	PageDataBase       string
	VizGraphDataBase   string
	VizDiagramDataBase string
	ExtraCSS           []string
	Lite               bool
	HeaderContext      *ppmodel.SiteHeaderContext
}

LayoutPageParams holds the full page chrome for a rendered HTML page.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL