styles

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Checkmark = "󰸞 "
	FailureX  = " "
	Clock     = "󰥔 "
	Warning   = " "
	Note      = "󰎞 "
)

Variables

View Source
var (
	// Normal text colors that should be used on a non-colored background
	NormalTextColor = lipgloss.AdaptiveColor{Light: "#202124", Dark: "#E4E4E4"}
	RedTextColor    = lipgloss.AdaptiveColor{Light: "#C82828", Dark: "#FF5454"}
	GreenTextColor  = lipgloss.AdaptiveColor{Light: "#718C00", Dark: "#98E024"}
	YellowTextColor = lipgloss.AdaptiveColor{Light: "#EAB700", Dark: "#E0D561"}
	BlueTextColor   = lipgloss.AdaptiveColor{Light: "#4171AE", Dark: "#74B2FF"}
	PurpleTextColor = lipgloss.AdaptiveColor{Light: "#8959A8", Dark: "#AE81FF"}
	CyanTextColor   = lipgloss.AdaptiveColor{Light: "#3E999F", Dark: "#58E1DB"}
	BrownTextColor  = lipgloss.AdaptiveColor{Light: "#3D251E", Dark: "#4A2B22"}
	SubtitleColor   = lipgloss.AdaptiveColor{Light: "#D0D0D0", Dark: "#444444"}

	// Answer colors
	CorrectAnswerStyle   = lipgloss.NewStyle().Foreground(GreenTextColor)
	IncorrectAnswerStyle = lipgloss.NewStyle().Foreground(RedTextColor)
	NeutralAnswerStyle   = lipgloss.NewStyle().Foreground(PurpleTextColor)
	WarningAnswerStyle   = lipgloss.NewStyle().Foreground(YellowTextColor)

	// Leaderboard colors
	GoldColor   = lipgloss.AdaptiveColor{Light: "#D4AF37", Dark: "#D4AF37"}
	SilverColor = lipgloss.AdaptiveColor{Light: "#C0C0C0", Dark: "#C0C0C0"}
	BronzeColor = lipgloss.AdaptiveColor{Light: "#CD7F32", Dark: "#CD7F32"}

	// Table colors
	TableBorderColor = PurpleTextColor

	// Puzzle view colors
	ItalColor = lipgloss.AdaptiveColor{Light: "#FF3374", Dark: "#FF3374"}
	StarColor = lipgloss.AdaptiveColor{Light: "#F1FA8C", Dark: "#F1FA8C"}
	LinkColor = lipgloss.AdaptiveColor{Light: "#8BE9FD", Dark: "#8BE9FD"}
	CodeColor = lipgloss.AdaptiveColor{Light: "#FAC3D5", Dark: "#FAC3D5"}

	// User display colors
	BothStarsColor = lipgloss.Color("#FFFF66")
	FirstStarColor = lipgloss.Color("#9999CC")
	NoStarsColor   = lipgloss.Color("#0F0F23")

	// Misc colors
	UpdateSpinnerColor = lipgloss.Color("#FB25A0")
)
View Source
var (
	// Text Styles
	NormalTextStyle = lipgloss.NewStyle().Foreground(NormalTextColor)
	RedTextStyle    = lipgloss.NewStyle().Foreground(RedTextColor)
	GreenTextStyle  = lipgloss.NewStyle().Foreground(GreenTextColor)
	YellowTextStyle = lipgloss.NewStyle().Foreground(YellowTextColor)
	BlueTextStyle   = lipgloss.NewStyle().Foreground(BlueTextColor)
	PurpleTextStyle = lipgloss.NewStyle().Foreground(PurpleTextColor)
	CyanTextStyle   = lipgloss.NewStyle().Foreground(CyanTextColor)
	BrownTextStyle  = lipgloss.NewStyle().Foreground(BrownTextColor)

	SubtitleStyle = lipgloss.NewStyle().Foreground(SubtitleColor).Italic(true)

	ItalStyle = lipgloss.NewStyle().Foreground(ItalColor)
	StarStyle = lipgloss.NewStyle().Foreground(StarColor)
	LinkStyle = lipgloss.NewStyle().Foreground(LinkColor).Underline(true)
	CodeStyle = lipgloss.NewStyle().Foreground(CodeColor).Bold(true).Italic(true)

	LoggerFatalStyle = lipgloss.NewStyle().
						SetString("FATAL").
						Padding(0, 1).
						Foreground(lipgloss.Color("0")).
						Background(lipgloss.Color("#FF5F5F"))

	LoggerInfoStyle = lipgloss.NewStyle().
					SetString("INFO").
					Padding(0, 1).
					Foreground(lipgloss.Color("0")).
					Background(lipgloss.Color("#5FFFD7"))

	LoggerErrorStyle = lipgloss.NewStyle().
						SetString("ERROR").
						Padding(0, 1).
						Background(lipgloss.Color("204")).
						Foreground(lipgloss.Color("0"))

	GlobalSpacingStyle = lipgloss.NewStyle().Padding(1, 1, 0)

	UserTableStyle = lipgloss.NewStyle().Foreground(NormalTextColor).
					BorderForeground(TableBorderColor).Align(lipgloss.Center)
)

Functions

func GetLeaderboardStyle

func GetLeaderboardStyle(row, col int) lipgloss.Style

func GetStdoutLogger

func GetStdoutLogger() *log.Logger

Types

This section is empty.

Jump to

Keyboard shortcuts

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