From 7ea79793d7c2e713eef8920bbfc7eaa42b3aecae Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Thu, 14 May 2020 21:12:13 -0400 Subject: [PATCH] Add Glow "logo" to stash browser --- ui/stash.go | 10 +++++++--- ui/ui.go | 12 ++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ui/stash.go b/ui/stash.go index 7b10661..a2ecf64 100644 --- a/ui/stash.go +++ b/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) diff --git a/ui/ui.go b/ui/ui.go index aae38d8..40fb503 100644 --- a/ui/ui.go +++ b/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