From 65a063323b4953747258fb3642fad813b3406716 Mon Sep 17 00:00:00 2001 From: Daniel Lopez Date: Sat, 21 Mar 2026 00:07:22 -0500 Subject: [PATCH] feat(tui): add ASCII art logo with Warm Ember coloring - Add logo.go with RenderLogo() (green leaf + amber text) and LogoPlain() - Update hub header and startup splash to use the new logo - Update README.md with monochrome ASCII logo --- README.md | 9 +++++++- internal/tui/app.go | 2 +- internal/tui/hub.go | 2 +- internal/tui/logo.go | 51 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 internal/tui/logo.go diff --git a/README.md b/README.md index 83513c7..06886ea 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,11 @@ -# 🥭 freshMango +``` + _) + __ _ __ __ + / _|_ _ ___ ___ | |__ | \/ |__ _ _ _ __ _ ___ +| _| '_/ -_)(_-< | '_ \ | |\/| / _` | ' \/ _` / _ \ +|_| |_| \___)/___||_||_| |_| |_\__,_|_||_\__, \___/ + |___/ +``` [![CI](https://github.com/juandagalo/fresh-mango/actions/workflows/ci.yml/badge.svg)](https://github.com/juandagalo/fresh-mango/actions/workflows/ci.yml) diff --git a/internal/tui/app.go b/internal/tui/app.go index 34fd9f3..9211979 100644 --- a/internal/tui/app.go +++ b/internal/tui/app.go @@ -414,7 +414,7 @@ func (a App) renderPlaceholder() string { } func (a App) renderStartupChecking() string { - brand := accentStyle.Bold(true).Render("freshMango") + brand := RenderLogo() msg := dimStyle.Render("Checking system...") block := lipgloss.JoinVertical(lipgloss.Center, brand, "", msg) diff --git a/internal/tui/hub.go b/internal/tui/hub.go index ade7573..8b4403b 100644 --- a/internal/tui/hub.go +++ b/internal/tui/hub.go @@ -78,7 +78,7 @@ func (h HubModel) Update(msg tea.Msg) (HubModel, tea.Cmd) { func (h HubModel) View() string { var sections []string - header := accentStyle.Bold(true).Render("freshMango") + header := RenderLogo() sections = append(sections, header) sections = append(sections, "") diff --git a/internal/tui/logo.go b/internal/tui/logo.go new file mode 100644 index 0000000..de85870 --- /dev/null +++ b/internal/tui/logo.go @@ -0,0 +1,51 @@ +package tui + +import ( + "strings" + + "github.com/charmbracelet/lipgloss" +) + +// ASCII art logo for freshMango. +// Line 1 contains the leaf/stem "_)" which is rendered in green; +// the remaining lines form the text and are rendered in accent/amber. +const logo = ` _) + __ _ __ __ + / _|_ _ ___ ___ | |__ | \/ |__ _ _ _ __ _ ___ +| _| '_/ -_)(_-< | '_ \ | |\/| / _` + "`" + ` | ' \/ _` + "`" + ` / _ \ +|_| |_| \___)/___||_||_| |_| |_\__,_|_||_\__, \___/ + |___/` + +// logoPlain is the raw logo without any ANSI styling. +const logoPlain = ` _) + __ _ __ __ + / _|_ _ ___ ___ | |__ | \/ |__ _ _ _ __ _ ___ +| _| '_/ -_)(_-< | '_ \ | |\/| / _` + "`" + ` | ' \/ _` + "`" + ` / _ \ +|_| |_| \___)/___||_||_| |_| |_\__,_|_||_\__, \___/ + |___/` + +// RenderLogo returns the ASCII logo with Lipgloss coloring: +// the leaf/stem on line 1 in green, the rest in accent/amber. +func RenderLogo() string { + lines := strings.Split(logo, "\n") + styled := make([]string, len(lines)) + + leafStyle := lipgloss.NewStyle().Foreground(colorGreen).Bold(true) + textStyle := lipgloss.NewStyle().Foreground(colorAccent).Bold(true) + + for i, line := range lines { + if i == 0 { + // First line is the leaf/stem — render in green + styled[i] = leafStyle.Render(line) + } else { + styled[i] = textStyle.Render(line) + } + } + + return strings.Join(styled, "\n") +} + +// LogoPlain returns the plain monochrome ASCII logo (for README or fallback). +func LogoPlain() string { + return logoPlain +}