layouts

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

templ: version: v0.3.1020

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base

func Base(p Page) templ.Component

Types

type Island added in v0.7.0

type Island struct {
	CSS []string
	JS  []string
}

Island lists an interactive page's extra assets. It exists because only the DAG screen loads React (~350 KB): embedding that in Base would make every SSR page pay for an interactivity it does not use.

type Page added in v0.7.0

type Page struct {
	Title string

	// Kicker is the small-caps crumb above the title ("DASHBOARD", "WORKFLOWS").
	Kicker string

	// Active matches the menu item's key.
	Active string

	// Actions occupies the header's right-hand corner. Nil = no buttons.
	Actions templ.Component

	// Island carries the extra assets of the interactive screens.
	Island Island

	// Wide removes the width limit. The DAG uses the whole screen; text does
	// not.
	Wide bool
}

Page describes each screen's context. A struct rather than five positional parameters: by the time the fifth went in, the call had already become guesswork.

Jump to

Keyboard shortcuts

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