init
This commit is contained in:
commit
d295c7f139
1527 files changed
+270726
No files matched your search
@@ -0,0 +1,24 @@
|
||||
package theme
|
||||
|
||||
import "github.com/charmbracelet/lipgloss"
|
||||
|
||||
func newCatppuccinMocha() Theme {
|
||||
return Theme{
|
||||
// Catppuccin Mocha palette
|
||||
Base: lipgloss.Color("#1e1e2e"),
|
||||
Surface: lipgloss.Color("#313244"),
|
||||
Overlay: lipgloss.Color("#45475a"),
|
||||
Text: lipgloss.Color("#cdd6f4"),
|
||||
Subtext: lipgloss.Color("#a6adc8"),
|
||||
|
||||
// Accents
|
||||
Blue: lipgloss.Color("#89b4fa"),
|
||||
Mauve: lipgloss.Color("#cba6f7"),
|
||||
Green: lipgloss.Color("#a6e3a1"),
|
||||
Yellow: lipgloss.Color("#f9e2af"),
|
||||
Sky: lipgloss.Color("#89dceb"),
|
||||
Peach: lipgloss.Color("#fab387"),
|
||||
Red: lipgloss.Color("#f38ba8"),
|
||||
Pink: lipgloss.Color("#f5c2e7"),
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package theme
|
||||
|
||||
import "github.com/charmbracelet/lipgloss"
|
||||
|
||||
func newCatppuccinLatte() Theme {
|
||||
return Theme{
|
||||
// Catppuccin Latte palette
|
||||
Base: lipgloss.Color("#eff1f5"),
|
||||
Surface: lipgloss.Color("#dce0e8"),
|
||||
Overlay: lipgloss.Color("#9ca0b0"),
|
||||
Text: lipgloss.Color("#4c4f69"),
|
||||
Subtext: lipgloss.Color("#5c5f77"),
|
||||
|
||||
// Accents
|
||||
Blue: lipgloss.Color("#1e66f5"),
|
||||
Mauve: lipgloss.Color("#8839ef"),
|
||||
Green: lipgloss.Color("#40a02b"),
|
||||
Yellow: lipgloss.Color("#df8e1d"),
|
||||
Sky: lipgloss.Color("#04a5e5"),
|
||||
Peach: lipgloss.Color("#fe640b"),
|
||||
Red: lipgloss.Color("#d20f39"),
|
||||
Pink: lipgloss.Color("#ea76cb"),
|
||||
}
|
||||
}
|
||||
@@ -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