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

View file

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