Add Glow "logo" to stash browser

This commit is contained in:
Christian Rocha 2020-05-14 21:12:13 -04:00 committed by Christian Muehlhaeuser
parent f3a91f0a40
commit 7ea79793d7
2 changed files with 15 additions and 7 deletions

View file

@ -17,7 +17,7 @@ import (
const (
itemHeight = 3
topPadding = 3
topPadding = 5
bottomPadding = 4
)
@ -180,8 +180,12 @@ func stashView(m stashModel) string {
}
s += fmt.Sprintf(
"Heres your markdown stash:\n\n%s\n\n%s%s\n\n%s",
stashPopulatedView(m), blankLines, paginator.View(m.paginator), helpView(m),
"%s\n\nHeres your markdown stash.\n\n%s\n\n%s%s\n\n%s",
glowLogoView(" Glow "),
stashPopulatedView(m),
blankLines,
paginator.View(m.paginator),
helpView(m),
)
}
return "\n" + indent.String(s, 2)

View file

@ -263,14 +263,18 @@ func view(mdl boba.Model) string {
return "\n" + indent.String(s, 2)
}
func statusBarView(m model) string {
// Logo
logoText := " Glow "
logo := te.String(logoText).
func glowLogoView(text string) string {
return te.String(text).
Bold().
Foreground(glowLogoTextColor).
Background(common.Fuschia.Color()).
String()
}
func statusBarView(m model) string {
// Logo
logoText := " Glow "
logo := glowLogoView(logoText)
// Note
noteText := m.docNote