aboutsummaryrefslogtreecommitdiff
path: root/internal/tui/styles.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-23 14:03:04 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-23 14:03:04 +0200
commit2e91d69ffb5989a167821979d4ed8d71a0f6ecbe (patch)
tree52bfee726eb3075d384f0256682bf4321cb65585 /internal/tui/styles.go
parent07bf5808039283ef7375b4af7703419f26b08b82 (diff)
downloadlectio-2e91d69ffb5989a167821979d4ed8d71a0f6ecbe.tar.gz
lectio-2e91d69ffb5989a167821979d4ed8d71a0f6ecbe.zip
tui: colored reader + version switch
Diffstat (limited to 'internal/tui/styles.go')
-rw-r--r--internal/tui/styles.go44
1 files changed, 44 insertions, 0 deletions
diff --git a/internal/tui/styles.go b/internal/tui/styles.go
new file mode 100644
index 0000000..94b591e
--- /dev/null
+++ b/internal/tui/styles.go
@@ -0,0 +1,44 @@
+package tui
+
+import "github.com/charmbracelet/lipgloss"
+
+// Color roles for the reader. lipgloss.AdaptiveColor picks the Light or Dark
+// value based on the terminal's detected background, and the default
+// renderer's color profile already honors NO_COLOR (muesli/termenv's
+// EnvColorProfile falls back to Ascii, so styled text degrades to plain
+// text automatically -- no extra handling needed here).
+var (
+ accentColor = lipgloss.AdaptiveColor{Light: "#8839ef", Dark: "#cba6f7"} // heading
+ dimColor = lipgloss.AdaptiveColor{Light: "#6c6f85", Dark: "#a6adc8"} // citation
+ mutedColor = lipgloss.AdaptiveColor{Light: "#9ca0b0", Dark: "#6c7086"} // verse numbers
+ textColor = lipgloss.AdaptiveColor{Light: "#4c4f69", Dark: "#cdd6f4"} // verse text (default)
+ barColor = lipgloss.AdaptiveColor{Light: "#eff1f5", Dark: "#313244"} // header/footer background
+ barTextColor = lipgloss.AdaptiveColor{Light: "#4c4f69", Dark: "#cdd6f4"}
+ errColor = lipgloss.AdaptiveColor{Light: "#d20f39", Dark: "#f38ba8"}
+)
+
+var (
+ // headingStyle renders a reading section's heading (e.g. "Ewangelia").
+ headingStyle = lipgloss.NewStyle().Bold(true).Foreground(accentColor)
+
+ // citationStyle renders a section's subtitle/citation line.
+ citationStyle = lipgloss.NewStyle().Faint(true).Foreground(dimColor)
+
+ // verseNumStyle renders a bible verse's "chapter:verse" prefix.
+ verseNumStyle = lipgloss.NewStyle().Foreground(mutedColor)
+
+ // verseTextStyle renders verse/paragraph body text.
+ verseTextStyle = lipgloss.NewStyle().Foreground(textColor)
+
+ // refrainStyle renders a responsorial psalm's repeated refrain.
+ refrainStyle = lipgloss.NewStyle().Italic(true).Foreground(textColor)
+
+ // headerStyle renders the top bar (date + active version).
+ headerStyle = lipgloss.NewStyle().Bold(true).Foreground(barTextColor).Background(barColor).Padding(0, 1)
+
+ // footerStyle renders the bottom keybar.
+ footerStyle = lipgloss.NewStyle().Faint(true).Foreground(barTextColor).Background(barColor).Padding(0, 1)
+
+ // errStyle renders the error line.
+ errStyle = lipgloss.NewStyle().Bold(true).Foreground(errColor)
+)