From b1a72a5a2ef092a1bfa4b18bc8d8bd015fcdaedc Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Fri, 13 Feb 2026 10:14:05 +0100 Subject: [PATCH] add global style package --- internal/style/styles.go | 28 ++++++++++++++++++++++++++++ internal/style/themes.go | 14 ++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 internal/style/styles.go create mode 100644 internal/style/themes.go diff --git a/internal/style/styles.go b/internal/style/styles.go new file mode 100644 index 0000000..7dd47c8 --- /dev/null +++ b/internal/style/styles.go @@ -0,0 +1,28 @@ +package style + +import "github.com/charmbracelet/lipgloss" + +// Color palette +var ( + PrimaryColor = lipgloss.AdaptiveColor{Light: "#007acc", Dark: "#1e90ff"} + SecondaryColor = lipgloss.AdaptiveColor{Light: "#ff6f61", Dark: "#ff6347"} + AccentColor = lipgloss.AdaptiveColor{Light: "#6a5acd", Dark: "#9370db"} + Background = lipgloss.AdaptiveColor{Light: "#ffffff", Dark: "#1e1e1e"} + TextColor = lipgloss.AdaptiveColor{Light: "#000000", Dark: "#ffffff"} +) + +var ( + AppStyle = lipgloss.NewStyle().Padding(1, 2).Background(Background).Foreground(TextColor) +) + +var ( + DefaultBorder = lipgloss.NormalBorder() + BorderStyle = lipgloss.NewStyle().Border(DefaultBorder).BorderForeground(PrimaryColor) +) + +var ( + TitleStyle = lipgloss.NewStyle().Foreground(PrimaryColor).Bold(true) + DescriptionStyle = lipgloss.NewStyle().Foreground(TextColor).Italic(true) + DetailStyle = lipgloss.NewStyle().Foreground(SecondaryColor) + HelpStyle = lipgloss.NewStyle().Foreground(AccentColor) +) diff --git a/internal/style/themes.go b/internal/style/themes.go new file mode 100644 index 0000000..c6861bd --- /dev/null +++ b/internal/style/themes.go @@ -0,0 +1,14 @@ +package style + +import ( + "github.com/charmbracelet/huh" + "github.com/charmbracelet/lipgloss" +) + +func HuhCenterTheme() *huh.Theme { + theme := huh.ThemeBase16() + + theme.Focused.Base = lipgloss.NewStyle().Align(lipgloss.Center) + + return theme +}