style

package
v0.0.0-...-88bec2d Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// LGDefBorder is the default hidden border for lipgloss tables.
	LGDefBorder = lipgloss.HiddenBorder()
	// LGTable is a pre-configured lipgloss table with a hidden border.
	LGTable = table.New().Border(LGDefBorder)

	// Cmd is the style for command/section headers.
	Cmd = lipgloss.NewStyle().Foreground(catBase).Background(catBlue).
		Bold(true).PaddingLeft(1).PaddingRight(1)

	// TitleKey is the style for main titles' keys.
	TitleKey = lipgloss.NewStyle().
				Foreground(catBlue).Bold(true)

	// Title is the style for main titles' values.
	Title = lipgloss.NewStyle().
			Foreground(catLavander).Bold(true).
			PaddingLeft(1)

	// Title2 is an alternative style for titles with a background color.
	Title2 = lipgloss.NewStyle().
			Foreground(catBase).Background(catPeach).Bold(true).
			PaddingLeft(1).PaddingRight(1)

	// ItemKey is the style for item keys with minimal padding.
	ItemKey = lipgloss.NewStyle().
			Foreground(catBlue).
			PaddingLeft(1).Bold(true)

	// ItemKeyP3 is the style for item keys with more left padding.
	ItemKeyP3 = lipgloss.NewStyle().
				Foreground(catBlue).
				PaddingLeft(3).Bold(true)

	// HeadKeyP3 is the style for header keys in tables with padding.
	HeadKeyP3 = lipgloss.NewStyle().
				Foreground(catFlamingo).
				PaddingLeft(3)

	// HeadValue is the style for header values in tables.
	HeadValue = lipgloss.NewStyle().
				Foreground(catSapphire)

	// CertKeyP3 is the style for certificate keys with padding.
	CertKeyP3 = lipgloss.NewStyle().
				Foreground(catLavander).
				PaddingLeft(3)

	// CertKeyP4 is the style for certificate keys with more padding.
	CertKeyP4 = lipgloss.NewStyle().
				Foreground(catLavander).
				PaddingLeft(4)

	// CertKeyP5 is the style for certificate keys with maximum padding.
	CertKeyP5 = lipgloss.NewStyle().
				Foreground(catLavander).
				PaddingLeft(5)

	// CertValue is the style for certificate values.
	CertValue = lipgloss.NewStyle().
				Foreground(catPeach)

	// CertValueNotice is the style for highlighted certificate values (e.g. CA status).
	CertValueNotice = lipgloss.NewStyle().
					Foreground(catMauve)

	// Via is the style for "via" transport information.
	Via = lipgloss.NewStyle().
		Foreground(catMauve).Italic(true).
		PaddingLeft(1)

	// URL is the style for URLs.
	URL = lipgloss.NewStyle().
		Foreground(catFlamingo).Bold(true)

	// Status is the default style for HTTP status codes.
	Status = lipgloss.NewStyle().
			Foreground(catSapphire)

	// Status2xx is the style for 2xx HTTP status codes.
	Status2xx = lipgloss.NewStyle().
				Foreground(catGreen)

	// Status3xx is the style for 3xx HTTP status codes.
	Status3xx = lipgloss.NewStyle().
				Foreground(catMauve)

	// Status4xx is the style for 4xx HTTP status codes.
	Status4xx = lipgloss.NewStyle().
				Foreground(catYellow)

	// Status5xx is the style for 5xx HTTP status codes.
	Status5xx = lipgloss.NewStyle().
				Foreground(catRed)

	// StatusError is the style for error status codes (e.g. 0).
	StatusError = lipgloss.NewStyle().
				Foreground(catRed)

	// Error is the style for error messages.
	Error = lipgloss.NewStyle().
			Foreground(catPink).Italic(true)

	// Headers is the style for response headers.
	Headers = lipgloss.NewStyle().Italic(true).PaddingLeft(4).
			Foreground(catTeal)

	// BoolTrue is the style for boolean true values.
	BoolTrue = lipgloss.NewStyle().Foreground(catTeal)
	// BoolFalse is the style for boolean false values.
	BoolFalse = lipgloss.NewStyle().Foreground(catYellow)
	// Warn is the style for warning messages or near-expiration dates.
	Warn = lipgloss.NewStyle().Foreground(catYellow)
	// Crit is the style for critical errors or expired certificates.
	Crit = lipgloss.NewStyle().Foreground(lgRed)
)

Functions

func BoolStyle

func BoolStyle(b bool) string

BoolStyle returns a color-coded string representation of a boolean value.

func CodeSyntaxHighlight

func CodeSyntaxHighlight(lang, code string) string

CodeSyntaxHighlight applies syntax highlighting to a code string using the default theme.

func CodeSyntaxHighlightWithStyle

func CodeSyntaxHighlightWithStyle(lang, code string, chromaStyle string) string

CodeSyntaxHighlightWithStyle applies syntax highlighting to a code string using a specified chroma theme.

func LgSprintf

func LgSprintf(style lipgloss.Style, pattern string, a ...any) string

LgSprintf formats a string according to a pattern and applies a lipgloss style.

func PrintKeyInfoStyle

func PrintKeyInfoStyle(w io.Writer, privKey crypto.PrivateKey)

PrintKeyInfoStyle prints formatted information about a private key (type, size, curve) to the provided writer.

func StatusCodeParse

func StatusCodeParse(sc int) string

StatusCodeParse returns a color-coded string representation of an HTTP status code.

Types

This section is empty.

Jump to

Keyboard shortcuts

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