diff --git a/internal/tui/components/logo/logo.go b/internal/tui/components/logo/logo.go index 9d170ee6c2a0036ad9e4ca8b11c1a373fbb15080..7a063f79b7c8a9fd34507c1762b1c98842be5ac4 100644 --- a/internal/tui/components/logo/logo.go +++ b/internal/tui/components/logo/logo.go @@ -1,3 +1,4 @@ +// Package logo renders a Crush wordmark in a stylized way. package logo import ( @@ -42,7 +43,14 @@ func Render(version string, compact bool, o Opts) string { } // Title. - crush := renderWord(1, !compact, letterC, letterR, letterU, letterS, letterH) + const spacing = 1 + crush := renderWord(spacing, !compact, + letterC, + letterR, + letterU, + letterSStylized, + letterH, + ) crushWidth := lipgloss.Width(crush) b := new(strings.Builder) for r := range strings.SplitSeq(crush, "\n") { @@ -252,6 +260,42 @@ func letterS(stretch bool) string { ) } +// letterSStylized renders the letter S in a stylized way, more so than +// [letterS]. It takes an integer that determines how many cells to stretch the +// letter. If the stretch is less than 1, it defaults to no stretching. +func letterSStylized(stretch bool) string { + // Here's what we're making: + // + // ▄▀▀▀▀▀ + // ▀▀▀▀▀█ + // ▀▀▀▀▀ + + left := heredoc.Doc(` + ▄ + ▀ + ▀ + `) + center := heredoc.Doc(` + ▀ + ▀ + ▀ + `) + right := heredoc.Doc(` + ▀ + █ + `) + return joinLetterform( + left, + stretchLetterformPart(center, letterformProps{ + stretch: stretch, + width: 3, + minStretch: 7, + maxStretch: 12, + }), + right, + ) +} + // letterU renders the letter U in a stylized way. It takes an integer that // determines how many cells to stretch the letter. If the stretch is less than // 1, it defaults to no stretching.