Skip to content

Commit

Permalink
Adjust news header syle
Browse files Browse the repository at this point in the history
  • Loading branch information
meowgorithm committed Dec 24, 2020
1 parent 537ef30 commit 2d10fb8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
18 changes: 9 additions & 9 deletions ui/pager.go
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ui/stash.go
Expand Up @@ -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
Expand Down
14 changes: 12 additions & 2 deletions ui/styles.go
Expand Up @@ -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.
Expand Down

0 comments on commit 2d10fb8

Please sign in to comment.