mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-18 06:09:11 +02:00
Adjust news header syle
This commit is contained in:
parent
537ef308d2
commit
2d10fb8749
3 changed files with 22 additions and 12 deletions
18
ui/pager.go
18
ui/pager.go
|
|
@ -36,15 +36,15 @@ var (
|
|||
statusBarBg = common.NewColorPair("#242424", "#E6E6E6")
|
||||
|
||||
// Styling funcs
|
||||
statusBarScrollPosStyle = newStyle(common.NewColorPair("#5A5A5A", "#949494"), statusBarBg)
|
||||
statusBarNoteStyle = newStyle(statusBarNoteFg, statusBarBg)
|
||||
statusBarHelpStyle = newStyle(statusBarNoteFg, common.NewColorPair("#323232", "#DCDCDC"))
|
||||
statusBarStashDotStyle = newStyle(common.Green, statusBarBg)
|
||||
statusBarMessageStyle = newStyle(mintGreen, darkGreen)
|
||||
statusBarMessageStashIconStyle = newStyle(mintGreen, darkGreen)
|
||||
statusBarMessageScrollPosStyle = newStyle(mintGreen, darkGreen)
|
||||
statusBarMessageHelpStyle = newStyle(common.NewColorPair("#B6FFE4", "#B6FFE4"), common.Green)
|
||||
helpViewStyle = newStyle(statusBarNoteFg, common.NewColorPair("#1B1B1B", "#f2f2f2"))
|
||||
statusBarScrollPosStyle = newStyle(common.NewColorPair("#5A5A5A", "#949494"), statusBarBg, false)
|
||||
statusBarNoteStyle = newStyle(statusBarNoteFg, statusBarBg, false)
|
||||
statusBarHelpStyle = newStyle(statusBarNoteFg, common.NewColorPair("#323232", "#DCDCDC"), false)
|
||||
statusBarStashDotStyle = newStyle(common.Green, statusBarBg, false)
|
||||
statusBarMessageStyle = newStyle(mintGreen, darkGreen, false)
|
||||
statusBarMessageStashIconStyle = newStyle(mintGreen, darkGreen, false)
|
||||
statusBarMessageScrollPosStyle = newStyle(mintGreen, darkGreen, false)
|
||||
statusBarMessageHelpStyle = newStyle(common.NewColorPair("#B6FFE4", "#B6FFE4"), common.Green, false)
|
||||
helpViewStyle = newStyle(statusBarNoteFg, common.NewColorPair("#1B1B1B", "#f2f2f2"), false)
|
||||
)
|
||||
|
||||
type contentRenderedMsg string
|
||||
|
|
|
|||
|
|
@ -880,7 +880,7 @@ func stashView(m stashModel) string {
|
|||
if m.state == stashStateFilterNotes || m.state == stashStateShowFiltered {
|
||||
logoOrFilter = m.filterInput.View()
|
||||
} else if m.state == stashStateShowNews {
|
||||
logoOrFilter = glowLogoView(" Newsfeed ")
|
||||
logoOrFilter += newsTitleStyle(" News ")
|
||||
}
|
||||
|
||||
var pagination string
|
||||
|
|
|
|||
14
ui/styles.go
14
ui/styles.go
|
|
@ -40,11 +40,21 @@ var (
|
|||
dullYellowFg = newFgStyle(common.NewColorPair("#9BA92F", "#6BCB94")) // renders light green on light backgrounds
|
||||
redFg = newFgStyle(common.Red)
|
||||
faintRedFg = newFgStyle(common.FaintRed)
|
||||
|
||||
newsTitleStyle = newStyle(
|
||||
common.NewColorPair(common.Indigo.String(), common.Cream.String()),
|
||||
common.NewColorPair(common.Cream.String(), common.Indigo.String()),
|
||||
true,
|
||||
)
|
||||
)
|
||||
|
||||
// Returns a termenv style with foreground and background options.
|
||||
func newStyle(fg, bg common.ColorPair) func(string) string {
|
||||
return te.Style{}.Foreground(fg.Color()).Background(bg.Color()).Styled
|
||||
func newStyle(fg, bg common.ColorPair, bold bool) func(string) string {
|
||||
s := te.Style{}.Foreground(fg.Color()).Background(bg.Color())
|
||||
if bold {
|
||||
s = s.Bold()
|
||||
}
|
||||
return s.Styled
|
||||
}
|
||||
|
||||
// Returns a new termenv style with background options only.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue