blob: 94b591ee20b6f5f423845e8c8a97366fe7e2c08b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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)
)
|