mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 14:14:17 +00:00
Add Glow "logo" to stash browser
This commit is contained in:
parent
f3a91f0a40
commit
7ea79793d7
2 changed files with 15 additions and 7 deletions
10
ui/stash.go
10
ui/stash.go
|
@ -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(
|
||||
"Here’s your markdown stash:\n\n%s\n\n%s%s\n\n%s",
|
||||
stashPopulatedView(m), blankLines, paginator.View(m.paginator), helpView(m),
|
||||
"%s\n\nHere’s 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)
|
||||
|
|
12
ui/ui.go
12
ui/ui.go
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue