init
This commit is contained in:
commit
d295c7f139
1527 files changed
+270726
No files matched your search
@@ -0,0 +1,44 @@
|
||||
// Package theme provides the visual theme system for the dashboard.
|
||||
package theme
|
||||
|
||||
import (
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/muesli/termenv"
|
||||
)
|
||||
|
||||
// Theme holds all color definitions for the pipeline dashboard.
|
||||
type Theme struct {
|
||||
// Base colors
|
||||
Base lipgloss.Color
|
||||
Surface lipgloss.Color
|
||||
Overlay lipgloss.Color
|
||||
Text lipgloss.Color
|
||||
Subtext lipgloss.Color
|
||||
|
||||
// Accent colors
|
||||
Blue lipgloss.Color
|
||||
Mauve lipgloss.Color
|
||||
Green lipgloss.Color
|
||||
Yellow lipgloss.Color
|
||||
Sky lipgloss.Color
|
||||
Peach lipgloss.Color
|
||||
Red lipgloss.Color
|
||||
Pink lipgloss.Color
|
||||
}
|
||||
|
||||
// NewTheme creates a theme by name. Use "auto" or "" to detect from terminal background.
|
||||
func NewTheme(name string) Theme {
|
||||
switch name {
|
||||
case "catppuccin-mocha":
|
||||
return newCatppuccinMocha()
|
||||
case "catppuccin-latte":
|
||||
return newCatppuccinLatte()
|
||||
case "auto", "":
|
||||
if termenv.HasDarkBackground() {
|
||||
return newCatppuccinMocha()
|
||||
}
|
||||
return newCatppuccinLatte()
|
||||
default:
|
||||
return newCatppuccinMocha()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user