Documentation ¶
Index ¶
- Variables
- func AvailableHeight(height int) int
- func FloatRight(width int, str string) string
- func InverseColor(c lipgloss.Color) lipgloss.Color
- func Overlay(x, y int, fg, bg string, shadow bool) string
- func RandColor() (lipgloss.Color, lipgloss.Color)
- func SpaceBetween(width int, left []string, right []string, betweenChar string) string
- type Color
- type Config
- type Content
- type Dimensions
- type FooterLine
- type Grid
- type TabLine
- type Tabs
Constants ¶
This section is empty.
Variables ¶
var ( Spacer = lipgloss.NewStyle().Width StatusBarLogCount = lipgloss.NewStyle(). Padding(0, 1). Foreground(DefaultColor.Light). Render StatusBarBeamInfo = lipgloss.NewStyle(). Padding(0, 1) ErrorInfo = lipgloss.NewStyle(). Padding(0, 1). Background(DefaultColor.Error). Render Bold = lipgloss.NewStyle().Bold(true).Copy() )
var (
Light: "#2c323d",
Dark: "#2c323d",
}
)var DefaultColor = Color{ Border: lipgloss.Color("97"), Error: lipgloss.Color("31"), Light: lipgloss.Color("7"), Highlight: lipgloss.Color("11"), }
var (
SingleLineSpacer = lipgloss.NewStyle().Height(1).Width
)
Functions ¶
func AvailableHeight ¶ added in v0.0.2
func FloatRight ¶ added in v0.1.0
func Overlay ¶ added in v0.1.0
BEGIN OF COPYWRITE The following code is copied from a PR created on lipgloss to solve the issue of overlaying elements. Please see the PR:
https://github.com/buztard/lipgloss/tree/feature/overlay
Could not find a Copywrite statement, however credits to @buztard (https://github.com/buztard) who implemented and created the PR. Once the PR or an alternative is released within the context of lipgloss this code will be replaced.
Thanks @buztard, you saved my day/ui with this one :-)!
func SpaceBetween ¶ added in v0.1.0
SpaceBetween performs a row alignment on the left and right string slices where the content is pushed to the left and right respecifly as much as possible. Like in CSS display:flex; justify-content:space-between;. The slices should be of same length (each left[i] entry is matched with the right[i] entry). If the length differ, the short one is used as an upper limit.
Types ¶
type Config ¶ added in v0.0.3
type Config struct {
Colors Color `yaml:"colors"`
}
func LoadConfig ¶ added in v0.0.3
type Content ¶ added in v0.1.0
type Content struct { Dimensions // contains filtered or unexported fields }
type Dimensions ¶ added in v0.1.0
type Dimensions struct {
// contains filtered or unexported fields
}
func (Dimensions) Dims ¶ added in v0.1.0
func (dim Dimensions) Dims() Dimensions
func (Dimensions) Height ¶ added in v0.1.0
func (dim Dimensions) Height() int
func (Dimensions) Width ¶ added in v0.1.0
func (dim Dimensions) Width() int
type FooterLine ¶ added in v0.1.0
type FooterLine struct { // contains filtered or unexported fields }
func (*FooterLine) Render ¶ added in v0.1.0
func (footer *FooterLine) Render(content string) string
type Grid ¶ added in v0.1.0
type TabLine ¶ added in v0.1.0
type TabLine struct { Dimensions // contains filtered or unexported fields }