components

package
v0.10.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: 7 Imported by: 0

Documentation

Overview

templ: version: v0.3.1020

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Card added in v0.7.0

func Card(label string) templ.Component

Card is the base panel: a light surface, a thin border, a warm wide shadow.

func Dot added in v0.7.0

func Dot(status string) templ.Component

Dot is the minimal version, for dense tables where the label is already in the column.

func Duration added in v0.7.0

func Duration(d *time.Duration) string

Duration picks the unit by order of magnitude. "0.4s" says more than "400ms" in a column whose neighbour takes minutes.

func Empty added in v0.7.0

func Empty(msg, hint string) templ.Component

Empty communicates the absence of data without looking like an error. An empty table with no explanation sends the operator looking for a defect where there is none.

func ErrorButton added in v0.7.0

func ErrorButton(runID string) templ.Component

--------------------------------------------------------------------------- Err em dialogo

The error used to occupy a whole row below the run, inside the table. With a real stack trace that pushed the rest of the list off the screen and mixed two things — the list and the detail. Now the row holds a button, and the text lives in a native <dialog>: ESC closes it, the backdrop dims and the focus stays trapped inside it without a line of JavaScript of ours. ---------------------------------------------------------------------------

func ErrorDialog added in v0.7.0

func ErrorDialog(runID, workflow, status, message string) templ.Component

func Metric added in v0.7.0

func Metric(label, value, nota string, matiz string) templ.Component

Metric is one of the four numbers at the top of the Overview. The large serif number is what sets the editorial tone — in sans it would become just another dashboard.

func Rosca

Rosca resume a mesma janela em proporcao. O total no centro evita a leitura only relative: 95% of twenty runs is not 95% of two thousand.

func RunsChart added in v0.7.0

func RunsChart(buckets []postgres.Bucket) templ.Component

RunsChart draws one stacked column per hour, with the average-duration line on top — the two readings the Overview screen has to cross: "how many" and "quanto tempo".

func State added in v0.7.0

func State(status string) templ.Component

State desenha o estado de um Run.

The colours are desaturated on purpose: a dashboard's pure green and red fight the parchment and shout louder than the information. The shape carries meaning too — the dot is filled for what has finished and ringed for what is still alive — so it does not depend on colour alone.

func Tag added in v0.7.0

func Tag(text, rota string) templ.Component

Tag is a tag chip. It becomes a link when `rota` exists, to filter.

func Timestamp added in v0.7.0

func Timestamp(t *time.Time) string

Timestamp is the full date, for audit columns.

func When added in v0.7.0

func When(t *time.Time) string

When writes the instant relatively up to a day, and as an absolute date afterwards. "3 min ago" answers the operations question; "Mar 12 04:00" answers the audit one, and the boundary between the two sits around a day.

Types

type Arc added in v0.7.0

type Arc struct {
	Cor     string
	Dash    string
	Offset  int
	Tooltip string
	Link    string
}

type Bar added in v0.7.0

type Bar struct {
	X, Width               int
	BandX, BandWidth       int
	YSucceeded, HSucceeded int
	YFailed, HFailed       int
	YOutros, HOutros       int
	Tooltip                string
	Link                   string
}

type Brand added in v0.7.0

type Brand struct {
	X     int
	Label string
}

type GridLine added in v0.7.0

type GridLine struct {
	Y     int
	Label string
}

Jump to

Keyboard shortcuts

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