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 (
|
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(
|
||||||
"Here’s your markdown stash:\n\n%s\n\n%s%s\n\n%s",
|
"%s\n\nHere’s 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)
|
||||||
|
|
12
ui/ui.go
12
ui/ui.go
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue