caret

[ACTIVE] a command line tool for browsing Lobsters in your terminal
git clone git://git.figbert.com/caret.git
Log | Files | Refs | README | LICENSE

commit 2578957d3ff648e65a6c92bdb859967bf936e2b8
parent 96649bc80daed8c5a15f50a11e3b1fbe95e0d15d
Author: FIGBERT <figbert@figbert.com>
Date:   Tue,  5 Sep 2023 18:02:29 -0700

Style article meta block like Lobsters

Diffstat:
Marticle/meta.go | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/article/meta.go b/article/meta.go @@ -2,6 +2,9 @@ package article import ( "fmt" + + "git.figbert.com/caret/ui" + "github.com/charmbracelet/lipgloss" ) @@ -16,8 +19,6 @@ func getReaderModeMetaBlock(title string, url string) string { MarginTop(1). MarginBottom(1). Width(lineWidth) - blue := lipgloss.NewStyle().Foreground(lipgloss.Color("32")) - green := lipgloss.NewStyle().Foreground(lipgloss.Color("34")) urlRunes := []rune(url) if len(urlRunes) > lineWidth-2 { @@ -27,8 +28,8 @@ func getReaderModeMetaBlock(title string, url string) string { return style.Render( fmt.Sprintf( "%s\n%s\n%s", - title, blue.Render(url), - green.Render("Reader Mode"), + title, ui.Title().Render(url), + ui.TagText().Render("Reader Mode"), ), ) }