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 ¶
- func AssetHref(assetBaseURL, href string) string
- func BootstrapHydrationScript(assetMode string, assetBaseURL string, sharedDataBase string, ...) templ.Component
- func BootstrapSharedNavCacheScript(assetBaseURL string, sharedDataBase string, sharedDataHash string) templ.Component
- func Breadcrumb(baseURL string, items []BreadcrumbItem) templ.Component
- func BuildTagParentMap(tags []*ppmodel.NavTag) map[string]*ppmodel.NavTag
- func CommonHeadersSection(headers []*ppmodel.HeaderInfo, headersJSON string, baseURL string) templ.Component
- func DocHref(baseURL, href string) string
- func GraphJSONScript(graphJSON string) templ.Component
- func Head(title string, baseURL string, assetBaseURL string, extraCSS []string, ...) templ.Component
- func InlineExamples(mt *ppmodel.MediaTypeInfo) templ.Component
- func Layout(pageTitle string, siteTitle string, baseURL string, assetBaseURL string, ...) templ.Component
- func LayoutPage(params LayoutPageParams, content templ.Component) templ.Component
- func MermaidDiagramScript(diagram string) templ.Component
- func ModelPageTempl(page *ppmodel.ModelPage, baseURL string) templ.Component
- func ModelTypeIndexTempl(group *ppmodel.NavModelGroup, breadcrumb []BreadcrumbItem, baseURL string) templ.Component
- func ModelsIndexTempl(groups []*ppmodel.NavModelGroup, breadcrumb []BreadcrumbItem, baseURL string) templ.Component
- 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(page *ppmodel.OperationPage, baseURL string) templ.Component
- func RequestBodySection(rb *ppmodel.RequestBodyInfo, baseURL string) templ.Component
- func RootOperationItem(op *ppmodel.NavOperation, baseURL string) templ.Component
- func RootPageTempl(page *ppmodel.RootPage, baseURL string) templ.Component
- func RootTagSection(tag *ppmodel.NavTag, depth int, baseURL string) templ.Component
- func SecuritySchemeTypeBadge(sec *ppmodel.SecurityRequirement) templ.Component
- func TagIndexTempl(tag *ppmodel.NavTag, breadcrumb []BreadcrumbItem, baseURL string) templ.Component
- type BreadcrumbItem
- type LayoutPageParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssetHref ¶ added in v0.0.54
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 BootstrapSharedNavCacheScript ¶ added in v0.0.55
func Breadcrumb ¶
func Breadcrumb(baseURL string, items []BreadcrumbItem) templ.Component
func BuildTagParentMap ¶
BuildTagParentMap walks the NavTag tree once and returns a map from tag name to parent NavTag.
func CommonHeadersSection ¶
func DocHref ¶ added in v0.0.55
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 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 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 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 RootTagSection ¶
func SecuritySchemeTypeBadge ¶
func SecuritySchemeTypeBadge(sec *ppmodel.SecurityRequirement) templ.Component
func TagIndexTempl ¶
Types ¶
type BreadcrumbItem ¶
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
PageDataBase string
VizGraphDataBase string
VizDiagramDataBase string
ExtraCSS []string
Lite bool
HeaderContext *ppmodel.SiteHeaderContext
}
LayoutPageParams holds the full page chrome for a rendered HTML page.