- commit
- d925a68ea742bf6a2a75b2667f60620600769943
- parent
- c626d154ab134d245953916ddc52e3d969588e18
- author
- Dami <dami.etoile@gmail.com>
| M | stats/ | 6 | +++--- |
| M | ui/ | 28 | +++++++++++----------------- |
| M | ui/ | 9 | ++++++--- |
@@ -281,7 +281,7 @@ var (
281281 Foreground(ui.MenuAccent)282282 283283 statLabel = lipgloss.NewStyle().284- Foreground(ui.MenuText)284+ Foreground(ui.MenuTextDim)285285 286286 statValue = lipgloss.NewStyle().287287 Foreground(ui.MenuAccent).@@ -294,7 +294,7 @@ var (
294294 Foreground(ui.MenuDim)295295 296296 xpFraction = lipgloss.NewStyle().297- Foreground(ui.MenuTextDim)297+ Foreground(ui.MenuText)298298 299299 bannerRule = lipgloss.NewStyle().300300 Foreground(ui.MenuDim)@@ -364,7 +364,7 @@ func renderXPBar(currentXP, level int) string {
364364 365365 frac := xpFraction.Render(fmt.Sprintf(" %d/%d", currentXP, nextLevelXP))366366 367- return statLabel.Render("XP ") + bar + frac367+ return statLabel.Foreground(ui.MenuText).Render("XP ") + bar + frac368368 }369369 370370 // RenderBanner renders the profile summary banner.@@ -6,14 +6,7 @@ import (
66 "charm.land/lipgloss/v2"77 )88 9-// logo is the pre-rendered "puzzletea" ASCII art (FIGlet "small" font).10-// Stored as a raw string to avoid a runtime dependency on go-figure.11-const logo = "" +12- " _ _\n" +13- " _ __ _ _ ___ ___ | | ___ | |_ ___ __ _\n" +14- " | '_ \\ | || | |_ / |_ / | | / -_) | _| / -_) / _` |\n" +15- " | .__/ \\_,_| /__| /__| |_| \\___| \\__| \\___| \\__,_|\n" +16- " |_|"9+const logo = "puzzletea"1710 1811 // MainMenu is a custom main menu component with an ASCII art logo1912 // and styled item list. It replaces the generic list.Model for the@@ -57,17 +50,18 @@ func (m MainMenu) View() string {
5750 5851 var itemLines []string5952 for i, item := range m.items {60- var line string53+ var line, cursor, title string6154 if i == m.cursor {62- cursor := CursorStyle.Render("▸ ")63- title := SelectedItemStyle.Render(item.ItemTitle)64- desc := DimItemStyle.Render(" " + item.Desc)65- line = cursor + title + desc55+ cursor = CursorStyle.Render("⦾ ")56+ title = SelectedItemStyle.Render(item.ItemTitle)57+6658 } else {67- title := NormalItemStyle.Render(item.ItemTitle)68- desc := DimItemStyle.Render(" " + item.Desc)69- line = " " + title + desc59+ cursor = CursorStyle.Render("◦ ")60+ title = NormalItemStyle.Render(item.ItemTitle)61+7062 }63+ desc := DimItemStyle.Render("\n " + item.Desc)64+ line = cursor + title + desc + "\n"7165 itemLines = append(itemLines, line)7266 }7367 items := strings.Join(itemLines, "\n")@@ -82,5 +76,5 @@ func (m MainMenu) View() string {
8276 footer,8377 )8478 85- return HeavyPanel(inner)79+ return inner8680 }@@ -20,14 +20,17 @@ var (
2020 2121 // LogoStyle renders the ASCII art brand logo.2222 LogoStyle = lipgloss.NewStyle().23- Foreground(MenuAccent).24- Bold(true)23+ Bold(true).24+ Foreground(MenuText).25+ Background(MenuAccent).26+ Padding(0, 1).27+ Margin(1, 0)2528 2629 // MainMenuFrame wraps the main menu in a heavy double border.2730 MainMenuFrame = lipgloss.NewStyle().2831 Border(lipgloss.DoubleBorder()).2932 BorderForeground(MenuAccent).30- Padding(1, 3)33+ Padding(2, 4)3134 3235 // PanelFrame wraps sub-menus in a lighter rounded border.3336 PanelFrame = lipgloss.NewStyle().