* Add new style banner for picoclaw and picoclaw-launcher-tui
This commit is contained in:
parent
946af6b53d
commit
c3fbf5d6c1
2 changed files with 25 additions and 8 deletions
|
|
@ -5,6 +5,17 @@ import (
|
||||||
"github.com/rivo/tview"
|
"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() {
|
func applyStyles() {
|
||||||
tview.Styles.PrimitiveBackgroundColor = tcell.NewRGBColor(12, 13, 22)
|
tview.Styles.PrimitiveBackgroundColor = tcell.NewRGBColor(12, 13, 22)
|
||||||
tview.Styles.ContrastBackgroundColor = tcell.NewRGBColor(34, 19, 53)
|
tview.Styles.ContrastBackgroundColor = tcell.NewRGBColor(34, 19, 53)
|
||||||
|
|
@ -24,14 +35,7 @@ func bannerView() *tview.TextView {
|
||||||
text.SetDynamicColors(true)
|
text.SetDynamicColors(true)
|
||||||
text.SetTextAlign(tview.AlignCenter)
|
text.SetTextAlign(tview.AlignCenter)
|
||||||
text.SetBackgroundColor(tview.Styles.PrimitiveBackgroundColor)
|
text.SetBackgroundColor(tview.Styles.PrimitiveBackgroundColor)
|
||||||
text.SetText(
|
text.SetText(banner)
|
||||||
"[::b][#84aaff]██████╗ ██╗ ██████╗ ██████╗ ██████╗██╗ █████╗ ██╗ ██╗\n" +
|
|
||||||
"[#84aaff]██╔══██╗██║██╔════╝██╔═══██╗██╔════╝██║ ██╔══██╗██║ ██║\n" +
|
|
||||||
"[#84aaff]██████╔╝██║██║ ██║ ██║██║ ██║ ███████║██║ █╗ ██║\n" +
|
|
||||||
"[#84aaff]██╔═══╝ ██║██║ ██║ ██║██║ ██║ ██╔══██║██║███╗██║\n" +
|
|
||||||
"[#84aaff]██║ ██║╚██████╗╚██████╔╝╚██████╗███████╗██║ ██║╚███╔███╔╝\n" +
|
|
||||||
"[#84aaff]╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝╚══════╝╚═╝ ╚═╝ ╚══╝╚══╝",
|
|
||||||
)
|
|
||||||
text.SetBorder(false)
|
text.SetBorder(false)
|
||||||
return text
|
return text
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,20 @@ func NewPicoclawCommand() *cobra.Command {
|
||||||
return cmd
|
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() {
|
func main() {
|
||||||
|
|
||||||
|
fmt.Printf("%s", banner)
|
||||||
cmd := NewPicoclawCommand()
|
cmd := NewPicoclawCommand()
|
||||||
if err := cmd.Execute(); err != nil {
|
if err := cmd.Execute(); err != nil {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue