* Add new style banner for picoclaw and picoclaw-launcher-tui

This commit is contained in:
lxowalle 2026-03-03 11:30:01 +08:00
parent 946af6b53d
commit c3fbf5d6c1
2 changed files with 25 additions and 8 deletions

View file

@ -5,6 +5,17 @@ import (
"github.com/rivo/tview"
)
const color_blue = "[#3e5db9]"
const color_red = "[#d54646]"
const banner = "\r\n[::b]" +
color_blue + "██████╗ ██╗ ██████╗ ██████╗ " + color_red + " ██████╗██╗ █████╗ ██╗ ██╗\n" +
color_blue + "██╔══██╗██║██╔════╝██╔═══██╗" + color_red + "██╔════╝██║ ██╔══██╗██║ ██║\n" +
color_blue + "██████╔╝██║██║ ██║ ██║" + color_red + "██║ ██║ ███████║██║ █╗ ██║\n" +
color_blue + "██╔═══╝ ██║██║ ██║ ██║" + color_red + "██║ ██║ ██╔══██║██║███╗██║\n" +
color_blue + "██║ ██║╚██████╗╚██████╔╝" + color_red + "╚██████╗███████╗██║ ██║╚███╔███╔╝\n" +
color_blue + "╚═╝ ╚═╝ ╚═════╝ ╚═════╝ " + color_red + " ╚═════╝╚══════╝╚═╝ ╚═╝ ╚══╝╚══╝\n " +
"[:]"
func applyStyles() {
tview.Styles.PrimitiveBackgroundColor = tcell.NewRGBColor(12, 13, 22)
tview.Styles.ContrastBackgroundColor = tcell.NewRGBColor(34, 19, 53)
@ -24,14 +35,7 @@ func bannerView() *tview.TextView {
text.SetDynamicColors(true)
text.SetTextAlign(tview.AlignCenter)
text.SetBackgroundColor(tview.Styles.PrimitiveBackgroundColor)
text.SetText(
"[::b][#84aaff]██████╗ ██╗ ██████╗ ██████╗ ██████╗██╗ █████╗ ██╗ ██╗\n" +
"[#84aaff]██╔══██╗██║██╔════╝██╔═══██╗██╔════╝██║ ██╔══██╗██║ ██║\n" +
"[#84aaff]██████╔╝██║██║ ██║ ██║██║ ██║ ███████║██║ █╗ ██║\n" +
"[#84aaff]██╔═══╝ ██║██║ ██║ ██║██║ ██║ ██╔══██║██║███╗██║\n" +
"[#84aaff]██║ ██║╚██████╗╚██████╔╝╚██████╗███████╗██║ ██║╚███╔███╔╝\n" +
"[#84aaff]╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝╚══════╝╚═╝ ╚═╝ ╚══╝╚══╝",
)
text.SetText(banner)
text.SetBorder(false)
return text
}

View file

@ -48,7 +48,20 @@ func NewPicoclawCommand() *cobra.Command {
return cmd
}
const color_blue = "\033[1;38;2;62;93;185m"
const color_red = "\033[1;38;2;213;70;70m"
const banner = "\r\n" +
color_blue + "██████╗ ██╗ ██████╗ ██████╗ " + color_red + " ██████╗██╗ █████╗ ██╗ ██╗\n" +
color_blue + "██╔══██╗██║██╔════╝██╔═══██╗" + color_red + "██╔════╝██║ ██╔══██╗██║ ██║\n" +
color_blue + "██████╔╝██║██║ ██║ ██║" + color_red + "██║ ██║ ███████║██║ █╗ ██║\n" +
color_blue + "██╔═══╝ ██║██║ ██║ ██║" + color_red + "██║ ██║ ██╔══██║██║███╗██║\n" +
color_blue + "██║ ██║╚██████╗╚██████╔╝" + color_red + "╚██████╗███████╗██║ ██║╚███╔███╔╝\n" +
color_blue + "╚═╝ ╚═╝ ╚═════╝ ╚═════╝ " + color_red + " ╚═════╝╚══════╝╚═╝ ╚═╝ ╚══╝╚══╝\n " +
"\033[0m\r\n"
func main() {
fmt.Printf("%s", banner)
cmd := NewPicoclawCommand()
if err := cmd.Execute(); err != nil {
os.Exit(1)